Talk:Stirling's theorem

I am just beginning the Stirling's theorem article under the primary guidance of http://140.122.140.53/~yclin/02a/cx/cx22.pdf, and here is what I have for another section so far.

Proof of Theorem
First, define a sequence of positive numbers that corresponds to the limit in the theorem (by a factor of √2π):


 * $$a_n := \frac{n!}{\sqrt{n}} \left( \frac{e}{n} \right)^n .$$

Next, show that the sequence converges to a real number α by using the ratio of successive terms:

$$ \begin{align} \frac{a_n}{a_{n+1}} & = \frac{ \frac{n!}{\sqrt{n}} \left( \frac{e}{n} \right)^n }{ \frac{(n+1)!}{\sqrt{n+1}} \left( \frac{e}{n+1} \right)^{n+1} } \\ & = \frac{1}{n+1} \sqrt{ \frac{n+1}{n} } \left( \frac{1}{e} \frac{(n+1)^{n+1}}{n^n} \right) \\ & = \frac{1}{e} \left( 1+\frac{1}{n} \right)^{n+ 1/2} \end{align} $$

By taking the natural logarithm of the ratio, it is possible to set up an asymptotic expression.

$$ \begin{align} \log \left( \frac{a_n}{a_{n+1}} \right) & = \left( n + \frac{1}{2} \right) \log \left( 1 + \frac{1}{n} \right) - 1 \\ & = \left( n + \frac{1}{2} \right) \left( \frac{1}{n} - \frac{1}{2n^2} + \frac{1}{3n^3} + \mathcal{O} \left( \frac{1}{n^4} \right) \right) \\ & = \frac{1}{12n^2} + \mathcal{O} \left( \frac{1}{n^3} \right) \end{align} $$

(Note the cancellation required for the last expression.) This implies that eventually


 * $$ 0 < \log \left( \frac{a_n}{a_{n+1}} \right) \le \frac{1}{6n^2} .$$

So for M > N,


 * $$\log \left( \frac{a_N}{a_M} \right) = \sum_{i=N}^{M-1} \log \left( \frac{a_i}{a_{i+1}} \right) \le \sum_{i=N}^{M-1} \frac{1}{6i^2} \le \frac{\pi^2}{36}.$$

(See Basel problem.) A lower bound

--- I'll keep working on this later. I'll also start the Eventually (mathematics) page, which is from number theory. (See planetmath's "eventual property") A few other things need to be done, like seeking copyright information. Tachikoma&#39;s All Memory 20:33, 15 March 2007 (UTC)