Metamath Proof Explorer


Theorem stirlinglem10

Description: A bound for any B(N)-B(N + 1) that will allow to find a lower bound for the whole B sequence. (Contributed by Glauco Siliprandi, 29-Jun-2017)

Ref Expression
Hypotheses stirlinglem10.1 A = n n ! 2 n n e n
stirlinglem10.2 B = n log A n
stirlinglem10.4 K = k 1 2 k + 1 1 2 N + 1 2 k
stirlinglem10.5 L = k 1 2 N + 1 2 k
Assertion stirlinglem10 N B N B N + 1 1 4 1 N N + 1

Proof

Step Hyp Ref Expression
1 stirlinglem10.1 A = n n ! 2 n n e n
2 stirlinglem10.2 B = n log A n
3 stirlinglem10.4 K = k 1 2 k + 1 1 2 N + 1 2 k
4 stirlinglem10.5 L = k 1 2 N + 1 2 k
5 nnuz = 1
6 1zzd N 1
7 eqid n 1 + 2 n 2 log n + 1 n 1 = n 1 + 2 n 2 log n + 1 n 1
8 1 2 7 3 stirlinglem9 N seq 1 + K B N B N + 1
9 2cnd N 2
10 nncn N N
11 9 10 mulcld N 2 N
12 1cnd N 1
13 11 12 addcld N 2 N + 1
14 13 sqcld N 2 N + 1 2
15 0red N 0
16 1red N 1
17 2re 2
18 17 a1i N 2
19 nnre N N
20 18 19 remulcld N 2 N
21 20 16 readdcld N 2 N + 1
22 0lt1 0 < 1
23 22 a1i N 0 < 1
24 2rp 2 +
25 24 a1i N 2 +
26 nnrp N N +
27 25 26 rpmulcld N 2 N +
28 16 27 ltaddrp2d N 1 < 2 N + 1
29 15 16 21 23 28 lttrd N 0 < 2 N + 1
30 29 gt0ne0d N 2 N + 1 0
31 2z 2
32 31 a1i N 2
33 13 30 32 expne0d N 2 N + 1 2 0
34 14 33 reccld N 1 2 N + 1 2
35 16 renegcld N 1
36 21 resqcld N 2 N + 1 2
37 36 33 rereccld N 1 2 N + 1 2
38 1re 1
39 lt0neg2 1 0 < 1 1 < 0
40 38 39 ax-mp 0 < 1 1 < 0
41 23 40 sylib N 1 < 0
42 21 30 sqgt0d N 0 < 2 N + 1 2
43 36 42 recgt0d N 0 < 1 2 N + 1 2
44 35 15 37 41 43 lttrd N 1 < 1 2 N + 1 2
45 2nn 2
46 45 a1i N 2
47 expgt1 2 N + 1 2 1 < 2 N + 1 1 < 2 N + 1 2
48 21 46 28 47 syl3anc N 1 < 2 N + 1 2
49 36 42 elrpd N 2 N + 1 2 +
50 49 recgt1d N 1 < 2 N + 1 2 1 2 N + 1 2 < 1
51 48 50 mpbid N 1 2 N + 1 2 < 1
52 37 16 absltd N 1 2 N + 1 2 < 1 1 < 1 2 N + 1 2 1 2 N + 1 2 < 1
53 44 51 52 mpbir2and N 1 2 N + 1 2 < 1
54 1nn0 1 0
55 54 a1i N 1 0
56 4 a1i N j 1 L = k 1 2 N + 1 2 k
57 simpr N j 1 k = j k = j
58 57 oveq2d N j 1 k = j 1 2 N + 1 2 k = 1 2 N + 1 2 j
59 elnnuz j j 1
60 59 biimpri j 1 j
61 60 adantl N j 1 j
62 34 adantr N j 1 1 2 N + 1 2
63 61 nnnn0d N j 1 j 0
64 62 63 expcld N j 1 1 2 N + 1 2 j
65 56 58 61 64 fvmptd N j 1 L j = 1 2 N + 1 2 j
66 34 53 55 65 geolim2 N seq 1 + L 1 2 N + 1 2 1 1 1 2 N + 1 2
67 34 exp1d N 1 2 N + 1 2 1 = 1 2 N + 1 2
68 14 33 dividd N 2 N + 1 2 2 N + 1 2 = 1
69 68 eqcomd N 1 = 2 N + 1 2 2 N + 1 2
70 69 oveq1d N 1 1 2 N + 1 2 = 2 N + 1 2 2 N + 1 2 1 2 N + 1 2
71 49 rpcnne0d N 2 N + 1 2 2 N + 1 2 0
72 divsubdir 2 N + 1 2 1 2 N + 1 2 2 N + 1 2 0 2 N + 1 2 1 2 N + 1 2 = 2 N + 1 2 2 N + 1 2 1 2 N + 1 2
73 14 12 71 72 syl3anc N 2 N + 1 2 1 2 N + 1 2 = 2 N + 1 2 2 N + 1 2 1 2 N + 1 2
74 ax-1cn 1
75 binom2 2 N 1 2 N + 1 2 = 2 N 2 + 2 2 N 1 + 1 2
76 11 74 75 sylancl N 2 N + 1 2 = 2 N 2 + 2 2 N 1 + 1 2
77 76 oveq1d N 2 N + 1 2 1 = 2 N 2 + 2 2 N 1 + 1 2 - 1
78 9 10 sqmuld N 2 N 2 = 2 2 N 2
79 sq2 2 2 = 4
80 79 a1i N 2 2 = 4
81 80 oveq1d N 2 2 N 2 = 4 N 2
82 78 81 eqtrd N 2 N 2 = 4 N 2
83 11 mulid1d N 2 N 1 = 2 N
84 83 oveq2d N 2 2 N 1 = 2 2 N
85 9 9 10 mulassd N 2 2 N = 2 2 N
86 2t2e4 2 2 = 4
87 86 a1i N 2 2 = 4
88 87 oveq1d N 2 2 N = 4 N
89 84 85 88 3eqtr2d N 2 2 N 1 = 4 N
90 82 89 oveq12d N 2 N 2 + 2 2 N 1 = 4 N 2 + 4 N
91 4cn 4
92 91 a1i N 4
93 10 sqcld N N 2
94 92 93 10 adddid N 4 N 2 + N = 4 N 2 + 4 N
95 10 sqvald N N 2 = N N
96 10 mulid1d N N 1 = N
97 96 eqcomd N N = N 1
98 95 97 oveq12d N N 2 + N = N N + N 1
99 10 10 12 adddid N N N + 1 = N N + N 1
100 98 99 eqtr4d N N 2 + N = N N + 1
101 100 oveq2d N 4 N 2 + N = 4 N N + 1
102 90 94 101 3eqtr2d N 2 N 2 + 2 2 N 1 = 4 N N + 1
103 sq1 1 2 = 1
104 103 a1i N 1 2 = 1
105 102 104 oveq12d N 2 N 2 + 2 2 N 1 + 1 2 = 4 N N + 1 + 1
106 105 oveq1d N 2 N 2 + 2 2 N 1 + 1 2 - 1 = 4 N N + 1 + 1 - 1
107 10 12 addcld N N + 1
108 10 107 mulcld N N N + 1
109 92 108 mulcld N 4 N N + 1
110 109 12 pncand N 4 N N + 1 + 1 - 1 = 4 N N + 1
111 77 106 110 3eqtrd N 2 N + 1 2 1 = 4 N N + 1
112 111 oveq1d N 2 N + 1 2 1 2 N + 1 2 = 4 N N + 1 2 N + 1 2
113 70 73 112 3eqtr2d N 1 1 2 N + 1 2 = 4 N N + 1 2 N + 1 2
114 67 113 oveq12d N 1 2 N + 1 2 1 1 1 2 N + 1 2 = 1 2 N + 1 2 4 N N + 1 2 N + 1 2
115 4pos 0 < 4
116 115 a1i N 0 < 4
117 116 gt0ne0d N 4 0
118 nnne0 N N 0
119 19 16 readdcld N N + 1
120 nngt0 N 0 < N
121 19 ltp1d N N < N + 1
122 15 19 119 120 121 lttrd N 0 < N + 1
123 122 gt0ne0d N N + 1 0
124 10 107 118 123 mulne0d N N N + 1 0
125 92 108 117 124 mulne0d N 4 N N + 1 0
126 12 14 109 14 33 33 125 divdivdivd N 1 2 N + 1 2 4 N N + 1 2 N + 1 2 = 1 2 N + 1 2 2 N + 1 2 4 N N + 1
127 12 14 mulcomd N 1 2 N + 1 2 = 2 N + 1 2 1
128 127 oveq1d N 1 2 N + 1 2 2 N + 1 2 4 N N + 1 = 2 N + 1 2 1 2 N + 1 2 4 N N + 1
129 12 mulid1d N 1 1 = 1
130 129 eqcomd N 1 = 1 1
131 130 oveq1d N 1 4 N N + 1 = 1 1 4 N N + 1
132 12 92 12 108 117 124 divmuldivd N 1 4 1 N N + 1 = 1 1 4 N N + 1
133 131 132 eqtr4d N 1 4 N N + 1 = 1 4 1 N N + 1
134 68 133 oveq12d N 2 N + 1 2 2 N + 1 2 1 4 N N + 1 = 1 1 4 1 N N + 1
135 14 14 12 109 33 125 divmuldivd N 2 N + 1 2 2 N + 1 2 1 4 N N + 1 = 2 N + 1 2 1 2 N + 1 2 4 N N + 1
136 92 117 reccld N 1 4
137 108 124 reccld N 1 N N + 1
138 136 137 mulcld N 1 4 1 N N + 1
139 138 mulid2d N 1 1 4 1 N N + 1 = 1 4 1 N N + 1
140 134 135 139 3eqtr3d N 2 N + 1 2 1 2 N + 1 2 4 N N + 1 = 1 4 1 N N + 1
141 126 128 140 3eqtrd N 1 2 N + 1 2 4 N N + 1 2 N + 1 2 = 1 4 1 N N + 1
142 114 141 eqtrd N 1 2 N + 1 2 1 1 1 2 N + 1 2 = 1 4 1 N N + 1
143 66 142 breqtrd N seq 1 + L 1 4 1 N N + 1
144 59 biimpi j j 1
145 144 adantl N j j 1
146 oveq2 k = n 2 k = 2 n
147 146 oveq1d k = n 2 k + 1 = 2 n + 1
148 147 oveq2d k = n 1 2 k + 1 = 1 2 n + 1
149 146 oveq2d k = n 1 2 N + 1 2 k = 1 2 N + 1 2 n
150 148 149 oveq12d k = n 1 2 k + 1 1 2 N + 1 2 k = 1 2 n + 1 1 2 N + 1 2 n
151 elfznn n 1 j n
152 151 adantl N n 1 j n
153 2cnd N n 1 j 2
154 152 nncnd N n 1 j n
155 153 154 mulcld N n 1 j 2 n
156 1cnd N n 1 j 1
157 155 156 addcld N n 1 j 2 n + 1
158 0red n 0
159 1red n 1
160 17 a1i n 2
161 nnre n n
162 160 161 remulcld n 2 n
163 162 159 readdcld n 2 n + 1
164 22 a1i n 0 < 1
165 24 a1i n 2 +
166 nnrp n n +
167 165 166 rpmulcld n 2 n +
168 159 167 ltaddrp2d n 1 < 2 n + 1
169 158 159 163 164 168 lttrd n 0 < 2 n + 1
170 151 169 syl n 1 j 0 < 2 n + 1
171 170 gt0ne0d n 1 j 2 n + 1 0
172 171 adantl N n 1 j 2 n + 1 0
173 157 172 reccld N n 1 j 1 2 n + 1
174 10 adantr N n 1 j N
175 153 174 mulcld N n 1 j 2 N
176 175 156 addcld N n 1 j 2 N + 1
177 30 adantr N n 1 j 2 N + 1 0
178 176 177 reccld N n 1 j 1 2 N + 1
179 2nn0 2 0
180 179 a1i N n 1 j 2 0
181 152 nnnn0d N n 1 j n 0
182 180 181 nn0mulcld N n 1 j 2 n 0
183 178 182 expcld N n 1 j 1 2 N + 1 2 n
184 173 183 mulcld N n 1 j 1 2 n + 1 1 2 N + 1 2 n
185 3 150 152 184 fvmptd3 N n 1 j K n = 1 2 n + 1 1 2 N + 1 2 n
186 185 adantlr N j n 1 j K n = 1 2 n + 1 1 2 N + 1 2 n
187 169 gt0ne0d n 2 n + 1 0
188 163 187 rereccld n 1 2 n + 1
189 151 188 syl n 1 j 1 2 n + 1
190 189 adantl N j n 1 j 1 2 n + 1
191 21 30 rereccld N 1 2 N + 1
192 191 adantr N n 1 j 1 2 N + 1
193 192 182 reexpcld N n 1 j 1 2 N + 1 2 n
194 193 adantlr N j n 1 j 1 2 N + 1 2 n
195 190 194 remulcld N j n 1 j 1 2 n + 1 1 2 N + 1 2 n
196 186 195 eqeltrd N j n 1 j K n
197 readdcl n i n + i
198 197 adantl N j n i n + i
199 145 196 198 seqcl N j seq 1 + K j
200 oveq2 k = n 1 2 N + 1 2 k = 1 2 N + 1 2 n
201 34 adantr N n 1 j 1 2 N + 1 2
202 201 181 expcld N n 1 j 1 2 N + 1 2 n
203 4 200 152 202 fvmptd3 N n 1 j L n = 1 2 N + 1 2 n
204 37 adantr N n 1 j 1 2 N + 1 2
205 204 181 reexpcld N n 1 j 1 2 N + 1 2 n
206 203 205 eqeltrd N n 1 j L n
207 206 adantlr N j n 1 j L n
208 145 207 198 seqcl N j seq 1 + L j
209 31 a1i n 1 j 2
210 elfzelz n 1 j n
211 209 210 zmulcld n 1 j 2 n
212 1exp 2 n 1 2 n = 1
213 211 212 syl n 1 j 1 2 n = 1
214 1exp n 1 n = 1
215 210 214 syl n 1 j 1 n = 1
216 213 215 eqtr4d n 1 j 1 2 n = 1 n
217 216 adantl N n 1 j 1 2 n = 1 n
218 176 181 180 expmuld N n 1 j 2 N + 1 2 n = 2 N + 1 2 n
219 217 218 oveq12d N n 1 j 1 2 n 2 N + 1 2 n = 1 n 2 N + 1 2 n
220 156 176 177 182 expdivd N n 1 j 1 2 N + 1 2 n = 1 2 n 2 N + 1 2 n
221 176 sqcld N n 1 j 2 N + 1 2
222 31 a1i N n 1 j 2
223 176 177 222 expne0d N n 1 j 2 N + 1 2 0
224 156 221 223 181 expdivd N n 1 j 1 2 N + 1 2 n = 1 n 2 N + 1 2 n
225 219 220 224 3eqtr4d N n 1 j 1 2 N + 1 2 n = 1 2 N + 1 2 n
226 225 oveq2d N n 1 j 1 2 n + 1 1 2 N + 1 2 n = 1 2 n + 1 1 2 N + 1 2 n
227 1rp 1 +
228 227 a1i N n 1 j 1 +
229 17 a1i N n 1 j 2
230 152 nnred N n 1 j n
231 229 230 remulcld N n 1 j 2 n
232 180 nn0ge0d N n 1 j 0 2
233 181 nn0ge0d N n 1 j 0 n
234 229 230 232 233 mulge0d N n 1 j 0 2 n
235 231 234 ge0p1rpd N n 1 j 2 n + 1 +
236 1red N n 1 j 1
237 228 rpge0d N n 1 j 0 1
238 159 163 168 ltled n 1 2 n + 1
239 151 238 syl n 1 j 1 2 n + 1
240 239 adantl N n 1 j 1 2 n + 1
241 228 235 236 237 240 lediv2ad N n 1 j 1 2 n + 1 1 1
242 156 div1d N n 1 j 1 1 = 1
243 241 242 breqtrd N n 1 j 1 2 n + 1 1
244 152 188 syl N n 1 j 1 2 n + 1
245 19 adantr N n 1 j N
246 229 245 remulcld N n 1 j 2 N
247 15 19 120 ltled N 0 N
248 247 adantr N n 1 j 0 N
249 229 245 232 248 mulge0d N n 1 j 0 2 N
250 246 249 ge0p1rpd N n 1 j 2 N + 1 +
251 250 222 rpexpcld N n 1 j 2 N + 1 2 +
252 251 rpreccld N n 1 j 1 2 N + 1 2 +
253 210 adantl N n 1 j n
254 252 253 rpexpcld N n 1 j 1 2 N + 1 2 n +
255 244 236 254 lemul1d N n 1 j 1 2 n + 1 1 1 2 n + 1 1 2 N + 1 2 n 1 1 2 N + 1 2 n
256 243 255 mpbid N n 1 j 1 2 n + 1 1 2 N + 1 2 n 1 1 2 N + 1 2 n
257 202 mulid2d N n 1 j 1 1 2 N + 1 2 n = 1 2 N + 1 2 n
258 256 257 breqtrd N n 1 j 1 2 n + 1 1 2 N + 1 2 n 1 2 N + 1 2 n
259 226 258 eqbrtrd N n 1 j 1 2 n + 1 1 2 N + 1 2 n 1 2 N + 1 2 n
260 259 185 203 3brtr4d N n 1 j K n L n
261 260 adantlr N j n 1 j K n L n
262 145 196 207 261 serle N j seq 1 + K j seq 1 + L j
263 5 6 8 143 199 208 262 climle N B N B N + 1 1 4 1 N N + 1