Limit of Error in Stirling's Formula

Theorem
Consider Stirling's Formula:
 * $n! \sim \sqrt {2 \pi n} \left({\dfrac n e}\right)^n$

The ratio of $n!$ to its approximation $\sqrt {2 \pi n} \left({\dfrac n e}\right)^n$ is bounded as follows:
 * $e^{1 / \left({12 n + 1}\right)} \le \dfrac {n!} {\sqrt {2 \pi n} n^n e^{-n} } \le e^{1 / 12 n}$

Proof
Let $d_n = \ln n! - \left({n + \dfrac 1 2}\right) \ln n + n$.

From the argument in Stirling's Formula: Proof 2: Lemma 3 we have that $\left\langle{d_n - \dfrac 1 {12 n} }\right\rangle$ is an increasing sequence.

Then:

Let:
 * $f \left({x}\right) := \dfrac 1 {2 x} \ln \left({\dfrac {1 + x} {1 - x} }\right) - 1$

for $\left\vert{x}\right\vert < 1$.

By Stirling's Formula: Proof 2: Lemma 1:


 * $\displaystyle f \left({x}\right) = \sum_{k \mathop = 1}^\infty \frac {x^{2n} } {2n + 1}$

As $-1 < \dfrac 1 {2n + 1} < 1$ it can be substituted for $x$ from $(1)$:

Next:

It follows that:

The numerator equals:
 * $12 n \left({14 - 12}\right) + \left({13 - 36}\right) = 24 n - 23 > 0$

for $n = 1, 2, 3, \ldots$

Therefore the sequence $\left\langle{d_n - \dfrac 1 {12 n + 1} }\right\rangle$ is decreasing.

From Stirling's Formula, we have that:
 * $\displaystyle \lim_{n \to \infty} d_n = d$

where $d = \ln \left({\sqrt{2 \pi} }\right)$

and so:
 * $d_n - \dfrac 1 {12 n} < d < d_n - \dfrac 1 {12 n + 1}$

for $n = 1, 2, 3, \ldots$

Taking exponentials, and again from Stirling's Formula:
 * $e^{-1/12n} < \dfrac {\left({\sqrt{2n} }\right) n^{n + 1/2} e^{-n} } {n!} < e^{-1/\left({12n + 1}\right)}$

from whence the result.