This derivation of Stirling’s approximation (including upper and lower bound) uses infinite series for logarithms instead of integrals.

ln n! = n ln n − ∑_{k=1}^{n−1} k ln (1 + \frac{1}{k} ) = n ln n + ∑_{L=1}^{∞} (∑_{k=1}^{n−1} k(−1)^{L} \frac{k^{−L}}{L} )

= n ln n − (n − 1) + \frac{1}{2} ∑_{1}^{n−1} k^{−1} − \frac{1}{3} ∑_{1}^{n−1} k^{−2} + …

Approximate ∑ k^{−1} using

ln n = ∑_{1}^{n−1} ln (1 + \frac{1}{k} ) = ∑_{1}^{n−1} k^{−1} − \frac{1}{2} ∑_{1}^{n−1} k^{−2} + …

When we group according to powers of k we get:

ln n! = n ln n − (n − 1) + \frac{1}{2} ln n + (\frac{1}{4} − \frac{1}{3}) ∑_{1}^{n−1} k^{−2} + (−\frac{1}{6} + \frac{1}{4}) ∑_{1}^{n−1} k^{−3} + …

Let: S = (n + \frac{1}{2}) ln n − (n − 1) M_{L} = ∑_{k=1}^{∞} k^{−L} M = ∑_{L=2}^{∞}(−1)^{L} (\frac{1}{L + 1} − \frac{1}{2L}) M_{L}

\begin{aligned}ln n! & = S − \frac{1}{12} (M_{2} − ∑_{n}^{∞} k^{−2}) − ∑_{L=3}^{∞}(−1)^{L} (\frac{1}{L + 1} − \frac{1}{2L}) (M_{L} − ∑_{n}^{∞} k^{−L}) \\ & = S − M + \frac{1}{12} ∑_{n}^{∞} k^{−2} − \frac{1}{12} ∑_{n}^{∞} k^{−3} + \frac{3}{40} ∑_{n}^{∞} k^{−4} − \frac{1}{15} ∑_{n}^{∞} k^{−5} + … \end{aligned}

Since \frac{1}{12k^{2}} − \frac{1}{12k^{3}} + \frac{3}{40k^{4}} = \frac{1}{12} (\frac{1}{k} − \frac{1}{k + 1}) − \frac{k − 9}{120k^{4}(k + 1)}

S − M + \frac{1}{12n} − ∑_{n}^{∞} \frac{k − 9}{120k^{4}(k + 1)} > ln n! > S − M + \frac{1}{12n} − ∑_{n}^{∞} \frac{k − 9}{120k^{4}(k + 1)} − ∑_{n}^{∞} \frac{1}{15k^{5}}

For n ≥ 9, ln n! < S − M + 1/12n is immediate. For a lower bound, we can use

\frac{k − 9}{120k^{4}(k + 1)} + \frac{1}{15k^{5}} = \frac{k^{2} − k + 8}{120k^{5}(k + 1)} < [k ≥ 9] \frac{1}{120k^{3}(k + 1)} < \frac{1}{360} (\frac{1}{(k − 1)^{3}} − \frac{1}{k^{3}} )

to obtain ln n! > S − M + 1/(12n) − 1/(360(n − 1)^{3}).

To determine M, the usual argument involving Wallis’ product can be used:

lim_{n→∞} \frac{4^{n}(n!)^{2}}{\sqrt{2n}(2n!)} = lim \frac{2 · 4 · 6 … (2n − 2)\sqrt{2n}}{3 · 5 … (2n − 1)} = \sqrt{\frac{π}{2}} = e^{1−ln 2−M} So: e^{−M} = \frac{\sqrt{2π}}{e}