Stirling's formula: proof? Suppose we want to show that $$ n! \sim \sqrt{2 \pi} n^{n+(1/2)}e^{-n}$$
Instead we could show that $$\lim_{n \to \infty} \frac{n!}{n^{n+(1/2)}e^{-n}} = C$$ where $C$ is a constant. Maybe $C = \sqrt{2 \pi}$.
What is a good way of doing this? Could we use L'Hopital's Rule? Or maybe take the log of both sides (e.g., compute the limit of the log of the quantity)? So for example do the following $$\lim_{n \to \infty} \log \left[\frac{n!}{n^{n+(1/2)}e^{-n}} \right] =  \log C$$
 A: A proof I found a while ago entirely relies on creative telescoping. Since $\frac{1}{n^2}-\frac{1}{n(n+1)}=\frac{1}{n^2(n+1)}$,
$$\begin{eqnarray*} \sum_{n\geq m}\frac{1}{n^2}&=&\sum_{n\geq m}\left(\frac{1}{n}-\frac{1}{(n+1)}\right)+\frac{1}{2}\sum_{n\geq m}\left(\frac{1}{n^2}-\frac{1}{(n+1)^2}\right)\\&+&\frac{1}{6}\sum_{n\geq m}\left(\frac{1}{n^3}-\frac{1}{(n+1)^3}\right)-\frac{1}{6}\sum_{n\geq m}\frac{1}{n^3(n+1)^3}\tag{1}\end{eqnarray*} $$
hence, by the series representation for $\psi(z)=\frac{d}{dz}\log\Gamma(z)$ (where $\Gamma(z)$ is the analytic continuation of $\int_{0}^{+\infty}t^{z-1}e^{-t}\,dt$, defined for $\text{Re}(z)>0$):
$$ \psi'(m)=\sum_{n\geq m}\frac{1}{n^2}\leq \frac{1}{m}+\frac{1}{2m^2}+\frac{1}{6m^3}\tag{2}$$
and in a similar fashion:
$$ \psi'(m) \geq \frac{1}{m}+\frac{1}{2m^2}+\frac{1}{6m^3}-\frac{1}{30m^5}.\tag{3}$$
Integrating twice, we have that $\log\Gamma(m)$ behaves like:
$$ \log\Gamma(m)\approx\left(m-\frac{1}{2}\right)\log(m)-\color{red}{\alpha} m+\color{blue}{\beta}+\frac{1}{12m}\tag{4}$$
where $\color{red}{\alpha=1}$ follows from $\log\Gamma(m+1)-\log\Gamma(m)=\log m$.
That gives Stirling's inequality up to a multiplicative constant. 
$\color{blue}{\beta=\log\sqrt{2\pi}}$ then follows from Legendre's duplication formula and the well-known identity:
$$ \Gamma\left(\frac{1}{2}\right)=2 \int_{0}^{+\infty}e^{-x^2}\,dx = \sqrt{\pi}.\tag{5}$$

Addendum: if we apply creative telescoping like in the second part of this answer, i.e. by noticing that $k(x)=\frac{60x^2-60x+31}{60x^3-90x^2+66x-18}$ gives $k(x)-k(x+1)=\frac{1}{x^2}+O\left(\frac{1}{x^8}\right)$, we arrive at
$$\begin{eqnarray*} m!&\approx& 2^{\frac{37-32m}{42}}e^{\frac{1}{84} \left(42-\sqrt{35} \pi -84 m+2 \sqrt{35} \arctan\left[\sqrt{\frac{5}{7}} (2m-1)\right]\right)} \\
&\cdot&\sqrt{\pi}\, m\,(2m-1)^{\frac{8}{21}(2m-1)}\left(m^2-m+\frac{3}{5}\right)^{\frac{5}{84}(2m-1)}\tag{6}\end{eqnarray*} $$ 
that is much more accurate than the "usual" Stirling's inequality, but also way less "practical".
However, it might be fun to plug in different values of $m$ in $(6)$ to derive bizarre approximate identities involving $e,\pi,\sqrt{\pi}$ and values of the arctangent function, like
$$ \sqrt{\pi}\,\exp\left[-\frac{1}{42}\left(147+\sqrt{35} \arctan\frac{1}{\sqrt{35}}\right)\right]\approx 2^{\frac{19}{6}}3^{\frac{1}{6}}5^{\frac{5}{12}} 7^{-\frac{37}{12}}.\tag{7}$$
A: Depending on one's preferences, one might care that it is possible to understand Stirling's formula (perhaps really due to Laplace?) in a usefully more general context, namely, as an example of a "Laplace's method" or "stationary phase" sort of treatment of asymptotics of integrals.
This is available on-line on my page https://www-users.cse.umn.edu/~garrett/m/v/, with the file being https://www-users.cse.umn.edu/~garrett/m/v/basic_asymptotics.pdf
One might object to certain very-classical treatments which make Gamma appear as a singular thing. While I agree that it is of singular importance in applications within and without mathematics, the means of establishing its asymptotics are not.
A: The best derivation of Stirling's approximation I have seen starts from Euler's Summation Formula, valid for integers $a\leq b$ and $m\geq 1$
$$
\sum_{a\leq k<b}f(k) = \int_a^b f(x)\,dx
+\sum_{k=1}^m \frac{B_k}{k!} f^{(k-1)}(b) 
-\sum_{k=1}^m \frac{B_k}{k!} f^{(k-1)}(a) \\+ (-1)^{m+1} \int_a^b \frac{B_m}{m!}f^{(m)}(x)\,dx$$
Here, $f^{(n)}(x)$ refers to the $n$-th derivative of $f$ evaluated at $x$, and $B_k$ is the $k$-th Bernoulli number.
The "remainder term" $(-1)^{m+1} \int_a^b \frac{B_m}{m!}f^{(m)}(x)\,dx$ lies between $0$ and the first discarded term.
Applying Euler's Summation Formula to $f(x) = \ln(x)$, and using $a=1, b=n$, we obtain
$$
\sum_{1\leq k<n} \ln k = n\ln n - n +\sigma - \frac{\ln n}{2} 
+ \sum_{k=1}^m \frac{B_{2k}}{2k(2k-1)n^{2k-1}} + \varphi_{m,n}\frac{B_{2m+2}}{(2m+2)(2m+1)n^{2m+1}}
$$
where $\varphi_{m,n}$ depends on the $n$ and the number of terms $m$, but is always between zero and one.  $\sigma$ is a constant which is not determined by application of the formula.  The best method I have seen for determining that $\sigma = \ln(\sqrt{2\pi})$ is in Brylan Schmuland's answer above, although in Concrete Mathematics the derive it by applying the summation formula to $\sum\binom{2n}{k}$.
Adding $\ln n$ to both sides, we get
$$
\ln n! = n\ln n - n + \frac{\ln n}{2} + \ln \sqrt{2\pi} + \frac1{12n}-\frac1{360n^3} + \frac\epsilon{n^5}
$$
with an error term having $0 \leq \epsilon \leq \frac1{1260}$.
Lastly, exponentiate and series expand the terms of order $\frac1n$ or less to get
$$
n! = \sqrt{2\pi n}\left(\frac{n}{e}\right)^n 
\left( 1 + \frac1{12n} + \frac1{288n^2} - \frac{139}{51840n^3}
-\frac{571}{2488320 n^4} + \frac{\rho}{n^5}\right)
$$
with $-0.00001 < \rho < 0.00078$
At this level of approximation, the approximation, rounded to the nearest integer, is exact for up to $n=11$ (of course, the relative error in the approximation falls as $\frac1{n^5}$ with a small coefficient, and so is extremely small.
A: Inspired by the two references below, here's a short proof stripped of motivation and details.
For $t>0$, define
$$
g_t(y) = \begin{cases}
\displaystyle \left(1+\frac{y}{\sqrt{t}}\right)^{\!t} \,e^{-y\sqrt{t}} & \text{if } y>-\sqrt{t}, \\
0 & \text{otherwise}.
\end{cases}
$$
It is not hard to show that $t\mapsto g_t(y)$ is decreasing for $y\geq 0$ and increasing for $y\leq 0$. The limit is $g_\infty(y)=\exp(-y^2/2)$, so dominated convergence gives
$$
\lim_{t\to\infty}\int_{-\infty}^\infty g_t(y)\,dy
= \int_{-\infty}^\infty \exp(-y^2/2)\,dy
= \sqrt{2\pi}.
$$
Use the change of variables $x=y\sqrt{t}+t$ to get
$$
t!
= \int_0^\infty x^t e^{-x}\,dx
= \left(\frac{t}{e}\right)^t \sqrt{t} \int_{-\infty}^\infty g_t(y)\,dy.
$$
References: 
[1] J.M. Patin, A very short proof of Stirling's formula,
 American Mathematical Monthly 96 (1989),  41-42.
[2] Reinhard Michel, The $(n+1)$th proof of Stirling's formula,
 American Mathematical Monthly 115 (2008),  844-845.
A: If you're familiar with
$$\mathop {\lim }\limits_{n \to \infty } \frac{{\left( {2n} \right)!!}}{{\left( {2n - 1} \right)!!}}\frac{1}{{\sqrt n }} = \sqrt \pi  $$
Then you can use
$$\eqalign{
  & \mathop {\lim }\limits_{n \to \infty } \frac{{\left( {2n} \right)!{!^2}}}{{\left( {2n} \right)!}}\frac{1}{{\sqrt n }} = \sqrt \pi    \cr 
  & \mathop {\lim }\limits_{n \to \infty } \frac{{{2^{2n}}{{\left( {n!} \right)}^2}}}{{\left( {2n} \right)!}}\frac{1}{{\sqrt n }} = \sqrt \pi   \cr} $$
Now you can check that
$$\alpha  = \mathop {\lim }\limits_{n \to \infty } \frac{{n!{e^n}}}{{{n^n}\sqrt n }} = \mathop {\lim }\limits_{n \to \infty } \frac{{\left( {2n} \right)!{e^{2n}}}}{{{{\left( {2n} \right)}^{2n}}\sqrt {2n} }}$$
exists. Then square the first expression and divide by the latter to get
$$\alpha  = \mathop {\lim }\limits_{n \to \infty } \frac{{{{\left( {n!} \right)}^2}{e^{2n}}}}{{{n^{2n}}n}}\frac{{{{\left( {2n} \right)}^{2n}}\sqrt {2n} }}{{\left( {2n} \right)!{e^{2n}}}} = \mathop {\lim }\limits_{n \to \infty } \frac{{{{\left( {n!} \right)}^2}{2^{2n}}\sqrt 2 }}{{\left( {2n} \right)!\sqrt n }} = \sqrt {2\pi } $$
Thus you have that
$$\mathop {\lim }\limits_{n \to \infty } \frac{{n!{e^n}}}{{{n^n}\sqrt {2n} }} = \sqrt \pi  $$
or
$$n! \sim {n^n}{e^{ - n}}\sqrt {2\pi n} $$
A: Here is a derivation of Stirling's Formula as given by
$$\bbox[5px,border:2px solid #C0A000]{\sqrt{2\pi n}\left(\frac ne\right)^n\left(1+\frac{1}{12(n+1)}\right) \le n!\le \sqrt{2\pi n}\left(\frac ne\right)^n\left(1+\frac{1}{12(n-2)}\right)}\tag 1$$
In the ensuing development, we will use $(i)$ the formula for the trapezoidal rule for twice differentiable functions, $(ii)$ Wallis's Formula for $\pi$, and $(iii)$ standard inequalities.


USING THE TRAPEZOIDAL RULE:

To prove $(1)$, we begin with the trapezoidal rule formula
$$\int_a^b f(x)\,dx=\frac12\left(f(a)+f(b)\right)(b-a)-\frac1{12}f''(\xi)(b-a)^3\tag 2$$
for which $f''(x)$ exists for $x\in[a,b]$ and $\xi\in (a,b)$.  Letting $f(x)=\log(x)$ in $(2)$ shows that
$$\begin{align}
\int_1^n \log(x)\,dx&=\sum_{m=1}^{n-1} \int_m^{m+1}\log(x)\,dx\\\\
&=\sum_{m=1}^{n-1} \left(\frac12 (\log(m)+\log(m+1))+\frac1{12}\frac{1}{\xi_m^2}\right)\tag 3
\end{align}$$
where $m<\xi_m<m+1$.  Denoting $\frac1{12}\sum_{m=1}^{n-1}\frac{1}{\xi_m^2}$ by $C_n$, we see that $\lim_{n\to \infty}C_n=C<\infty$.
Now, we can rewrite $(3)$ as
$$\log(n!)=\log\left(e^{1-C_n}\sqrt{n}\left(\frac{n}{e}\right)^n\right)$$
which becomes
$$\bbox[5px,border:2px solid #C0A000]{n!=e^{1-C_n}\sqrt{n}\left(\frac{n}{e}\right)^n }\\\\\tag 4$$


USING WALLIS'S PROUCT FORMULA:

To evaluate the limit $\lim_{n\to \infty}e^{1-C_n}$, we rely on Wallis's Product for $\pi$ as given by
$$\frac{\pi}{2}=\lim_{n\to \infty}\frac{2^{4n}(n!)^4}{(2n+1)((2n)!)^2}\tag 5$$
Using $(4)$ in $(5)$ shows that
$$\frac{\pi}{2}=\lim_{n\to \infty}\frac{n^2}{(2n)(2n+1)}\left(e^{1-2C_n+C_{2n}}\right)^2$$
from which we find that
$$\bbox[5px,border:2px solid #C0A000]{\lim_{n\to \infty}e^{1-C_n}=\sqrt{2\pi}}\\\\\tag 6$$


PUTTING IT TOGETHER TO ARRIVE AT STIRLING'S FORMULA

We are now able to write the factorial
$$n!=\sqrt{2\pi n}\left(\frac ne\right)^n e^{C_n-C} \tag 7$$
Since $C_n\to C$, then we have Stirling's Formula
$$\bbox[5px,border:2px solid #C0A000]{n!\sim \sqrt{2\pi n}\left(\frac ne\right)^n }$$
as was to be shown!


DERIVING BOUNDS FOR $\displaystyle n!$:

It is easy to see that since $\frac{1}{(m+1)^2}<\frac1{\xi_m^2}<\frac{1}{m^2}$, then
$$C-C_n<\frac1{12}\int_{n-1}^\infty \frac{1}{x^2}\,dx=\frac{1}{12(n-1)}$$
and
$$C-C_n>\frac1{12}\int_{n+1}^\infty \frac{1}{x^2}\,dx=\frac{1}{12(n+1)}$$
Next, for $x<1/2$ the Mean-Value Theorem guarantees that
$$1+x<e^x<1+x+x^2$$
Hence, we see that for $n\ge 3$
$$1+\frac{1}{12(n+1)}<e^{C-C_n}<1+\frac{1}{12(n-1)}+\frac{1}{144(n-1)^2}<1+\frac{1}{12(n-2)}\tag 8$$
Finally, using $(8)$ in $(7)$ yields the coveted bounds in $(1)$

$$\bbox[5px,border:2px solid #C0A000]{\sqrt{2\pi n}\left(\frac ne\right)^n\left(1+\frac{1}{12(n+1)}\right) \le n!\le \sqrt{2\pi n}\left(\frac ne\right)^n\left(1+\frac{1}{12(n-2)}\right)}$$

A: The short and intuitive proof of Stirling formula I was taught long time ago relies on steepest descent/saddle point evaluation of Gamma integral.
Let us expand $f(x)=a\log x-x$ in Taylor series around its maximum $x_m$:
$0=f'(x)=a/x-1\Rightarrow x_m=a$, $f''(x)=-a/x^2$ hence for $a\rightarrow\infty$,
 $\Gamma(a+1)=\int_0^\infty e^{f(x)}dx\rightarrow e^{a\log{a}-a}\int_{-\infty}^{+\infty}e^{-(x-x_m)^2/(2a)}dx = e^{a\log{a}-a}\sqrt{2\pi a}$. Exactness of the proof depends on demonstration that contributions to integral away from $x_m$ become insignificant. For me it suffices that $\sigma/x_m\equiv\sqrt{a}/a\rightarrow 0$ for $a\rightarrow\infty$ but more elaborate discussion is possible. This relies on Gauss integral, proven e.g. as $\left[\int_{-\infty}^{+\infty}e^{-x^2}dx\right]^2=\int_{-\infty}^{+\infty}e^{-x^2-y^2}dx\,dy=\int_0^\infty e^{-r^2}2\pi r\,dr=\pi$
A: Using the Leibniz rule $\frac{d}{dt}\Bigg[\int_{a(t)}^{b(t)}f(x,t)dx\Bigg]=\int_{a(t)}^{b(t)}\frac{\partial}{\partial t}f(x,t)dx+\bigg[f(b(t),t)\frac{d}{dt}b(t)-f(a(t),t)\frac{d}{dt}a(t)\bigg]$
$$
\int_0^\infty e^{-x}dx=1\\
\text{Let }x=tu\implies dx=t.du,t>0\\
\int_0^\infty te^{-tu}du=1\implies \int_0^\infty e^{-tu}du=\frac{1}{t}\\
\frac{d}{dt}\int_0^\infty e^{-tu}du=\int_0^\infty \frac{\partial}{\partial t}e^{-tu}du=\frac{-1}{t^2}\\
\int_0^\infty ue^{-tu}du=\frac{1}{t^2}\\
\int_0^\infty u^2e^{-tu}du=\frac{2}{t^3}\\
\int_0^\infty u^3e^{-tu}du=\frac{6}{t^4}\\
\int_0^\infty u^4e^{-tu}du=\frac{24}{t^5}\\
\int_0^\infty u^ne^{-tu}du=\frac{n!}{t^{n+1}}\\
\implies \int_0^\infty \bigg[\frac{x}{t}\bigg]^ne^{-x}\frac{dx}{t}=\frac{n!}{t^{n+1}}\\
\implies \boxed{\int_0^\infty x^ne^{-x}dx=n!=\Gamma(n+1)}
$$
Dividing by $\bigg[\frac{n}{e}\bigg]^n$
$$
\bigg[\frac{e}{n}\bigg]^n\Gamma(n+1)=\int_0^\infty \left[\frac{x}{n}\right]^ne^{-(x-n)}dx\\
\text{Let } s=x-n,\\
\bigg[\frac{e}{n}\bigg]^n\Gamma(n+1)=\int_{-n}^\infty \bigg[1+\frac{s}{n}\bigg]^ne^{-s}ds=\int_{-n}^\infty f(s)ds
$$
where $f(s)=\bigg[1+\frac{s}{n}\bigg]^ne^{-s}$
$$
\ln(f(s))=n\ln\bigg[1+\frac{s}{n}\bigg]-s=n\bigg[\frac{s}{n}-\frac{1}{2}\bigg(\frac{s}{n}\bigg)^2+\frac{1}{3}\bigg(\frac{s}{n}\bigg)^3-\cdots\bigg]-s\\
=\frac{-s^2}{2n}+\frac{s^3}{3n^2}-\cdots
$$
For large $n$,
$$
\ln(f(s))\approx\frac{-s^2}{2n}
$$
$$
\bigg(\frac{e}{n}\bigg)^n\Gamma(n+1)\approx\int_{-\infty}^\infty e^{-s^2/2n}ds=\sqrt{2\pi n}, \text{ since }\int_{-\infty}^\infty e^{-at^2}dt=\sqrt{\frac{\pi}{a}}\\
\Gamma(n+1)\approx\bigg(\frac{n}{e}\bigg)^n\sqrt{2\pi n}\\
\implies \boxed{n!=\Gamma(n+1)\approx \bigg(\frac{n}{e}\bigg)^n\sqrt{2\pi n}}
$$
A: Stirling's approximation: Can we make it obvious?
By induction on $n$, using integration-by-parts for the inductive step, it is easily shown that
$$n!=\int_0^\infty\!x^n e^{-x} dx$$
for $\,n=0,1,2,$ etc.  Changing the variable of integration to
$$\color{blue}{t=\ln(x/n)}$$
gives
$$n!\,=\,n^{n+1\,}e^{-n}\int_{-\infty}^\infty\!e^{nf(t)} e^t dt$$
where
$$f(t)=1+t-e^t.$$
Now $f(t)$ has a negative second derivative everywhere, goes to $-\infty$ as $t\to\pm\infty$,  and has the maximum value $0$ at $\,t=0$.  At points sufficiently close to this maximum,  $f(t)$ can be replaced by a single term in $t^2$ with a matching second derivative, i.e. by $-\frac{1}{2}t^2$,  and the factor $e^t$ can be replaced by $1$.  Moreover, as $n\to\infty$,  the values of $f(t)$ and $e^t$ that contribute significantly to the integral are confined to an ever narrower range about the maximum of $f(t)$.  So we can make the indicated replacements, obtaining
$$n! \,\sim\, n^{n+1\,}e^{-n}\int_{-\infty}^\infty\!e^{-nt^{2\!}/2\,} dt\,.\label{estar}\tag{*}$$
The remaining integral has the form
$$I=\int_{-\infty}^\infty\!e^{-at^2} dt\,,$$
whence
$$I^2=\int_{-\infty}^\infty\!e^{-ax^2}dx \int_{-\infty}^\infty\!e^{-ay^2}dy \,= \int_{-\infty}^\infty\int_{-\infty}^\infty\!e^{-a(x^2+y^2)} dx\,dy\,.$$
This integral w.r.t. area over the $xy$ plane is easily re-expressed in polar coordinates and evaluated as $\pi/a$,  so that
$$I=\sqrt{\pi/a}\,.$$
The integral in equation$\,(\ref{estar})$ has $a=n/2$ and therefore comes to $\sqrt{2\pi/n}$,  which gives
$$n! \,\sim\, \sqrt{2\pi n}\,\left(\frac{n}{e}\right)^n.$$
A: Instead of a proof, how about a string of hints? This comes from Maxwell Rosenlicht's Introduction to Analysis (a great little easy-to-read text which is dirt cheap -- it's a Dover paperback).


*

*Chapter VI: Problem #22 Show that for $n=1,2,3,\dots$ we have that 
$$ 1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}-\ln(n)$$ is positive and it decreases as $n$ increases. Thus this converges to a number between 0 and 1 (Euler's constant).

*Chapter VII: Problem #39 For $n=0,1,2,\dots$ let $I_n=\int_0^{\pi/2} \sin^n(x)\,dx$. Show that 
(a) $\frac{d}{dx}\left(\cos(x)\sin^{n-1}(x)\right) = (n-1)\sin^{n-2}(x)-n\sin^n(x)$
(b) $I_n = \frac{n-1}{n}I_{n-2}$ if $n \geq 2$
(c) $I_{2n} = \frac{1\cdot 3\cdot 5\cdots (2n-1)}{2\cdot 4\cdot 6\cdots (2n)}\frac{\pi}{2}$ and $I_{2n+1} = \frac{2\cdot 4\cdot 6\cdots (2n)}{3\cdot 5\cdot 7\cdots (2n+1)}$ for $n=1,2,3,\dots$
(d) $I_0, I_1, I_2, \dots$ is a decreasing sequence having the limit zero and $$ \lim_{n \to \infty} \frac{I_{2n+1}}{I_{2n}}=1$$
(e) Wallis' product: $$\lim_{n \to \infty} \frac{2\cdot 2\cdot 4\cdot 4\cdot 6\cdot 6 \cdots (2n)\cdot (2n)}{1\cdot 3\cdot 3\cdot 5\cdot 5\cdot 7 \cdots (2n-1)\cdot (2n+1)}=\frac{\pi}{2}$$


*

*Chapter VII: Problem #40


(a) Show that if $f:\{ x\in \mathbb{R}\;|\; x\geq 1\} \to \mathbb{R}$ is continuous, then 
$$ \sum\limits_{i=1}^n f(i) = \int_1^{n+1} f(x)\,dx + \sum\limits_{i=1}^n\left(f(i)-\int_i^{i+1} f(x)\,dx\right)$$
(b) Show that if $i>1$, then $\ln(i)-\int_i^{i+1}\,dx$ differs from $-1/2i$ by less than $1/6i^2$. [Hint: Work out the integral using the Taylor series for $\ln(1+x)$ at the point $0$.]
(c) Use part (a) with $f=\ln$, part (b), and Problem #22 from Chapter VI to prove that the following limit exists: $$\lim_{n \to \infty} \left(\ln(n!)-\left(n+\frac{1}{2}\right)\ln(n)+n\right)$$
(d) Use part (e) of Problem #39 to compute the above limit, then obtaining:
$$ \lim_{n\to \infty} \frac{n!}{n^ne^{-n}\sqrt{2\pi n}}=1$$
(i.e. Stirling's Formula)
A: Here are a couple of "proofs" of Stirling's formula. They are quite elegant (in my opinion), but not rigorous. On could write down a real proof from these, but as they rely on some hidden machinery, the result would be quite heavy.
1) A probabilistic non-proof
We start from the expression $e^{-n} n^n/n!$, of which we want to find an equivalent. Let us fix $n$, and let $Y$ be a random variable with a Poisson distribution of parameter $n$. By definition, for any integer $k$, we have $\mathbb{P} (Y=k) = e^{-n} n^k/k!$. If we take $k=n$, we get $\mathbb{P} (Y=n) = e^{-n} n^n/n!$. The sum of $n$ independent random variables with a Poisson distribution of parameter $1$ has a Poisson distribution of parameter $n$; so let us take a sequence $(X_k)$ of i.i.d. random variables with a Poisson distribution of parameter $1$. Note that $\mathbb{E} (X_0) = 1$. We have:
$$\mathbb{P} \left( \sum_{k=0}^{n-1} (X_k - \mathbb{E} (X_k)) = 0 \right) = \frac{e^{-n} n^n}{n!}.$$
In other words, $e^{-n} n^n/n!$ is the probability that a centered random walk with Poissonnian steps of parameter $1$ is in $0$ at time $n$. We have tools to estimates such quantities, namely local central limit theorems. They assert that:
$$\frac{e^{-n} n^n}{n!} = \mathbb{P} \left( \sum_{k=0}^{n-1} (X_k - \mathbb{E} (X_k)) = 0 \right) \sim \frac{1}{\sqrt{2 \pi n \text{Var} (X_0)}},$$
a formula which is closely liked with Gauss integral and diffusion processes. Since the variance of $X_0$ is $1$, we get:
$$n! \sim \sqrt{2 \pi n} n^n e^{-n}.$$
The catch is of course that the local central limit theorems are in no way elementary results (except for the simple random walks, and that is if you already know Stirling's formula...). The methods I know to prove such results involve Tauberian theorems and residue analysis. In some way, this probabilistic stuff is a way to disguise more classical approaches (in my defense, if all you have is a hammer, everything looks like a nail).
I think one could get higher order terms for Stirling's formula by computing more precise asymptotics for Green's function in $0$, which requires the knowledge of higher moments for the Poisson distribution. Note that the generating function for a Poisson distribution of parameter $1$ is:
$$\mathbb{E} (e^{t X_0}) = e^{e^t-1},$$
and this "exponential of exponential" will appear again in a moment.
2) A generating functions non-proof
If you want to apply analytic methods to problems related to sequences, generating functions are a very useful tool. Alas, the series $\sum_{n \geq 0} n! z^n$ is not convergent for non-zero values of $z$. Instead, we shall work with:
$$e^z = \sum_{n \geq 0} \frac{z^n}{n!};$$
we are lucky, as this generating function is well-known. Let $\gamma$ be a simple loop around $0$ in the complex plane, oriented counter-clockwise. Let us fix some non-negative integer $n$. By Cauchy's formula,
$$\frac{1}{n!} = \frac{1}{n!} \frac{\text{d} e^z}{\text{d} z}_{|_0} = \frac{1}{2 \pi i} \oint_\gamma \frac{e^z}{z^{n+1}} \text{d} z.$$
We choose for $\gamma$ the circle of radius $n$ around $0$, with its natural parametrization $z (t) = n e^{it}$:
$$\frac{1}{n!} = \frac{1}{2 \pi i} \int_{- \pi}^{\pi} \frac{e^{n e^{it}}}{n^{n+1} e^{(n+1)it}} nie^{it} \text{d} t = \frac{e^n}{2 \pi n^n} \oint_{- \pi}^{\pi} e^{n (e^{it}-it-1)} \text{d} t = \frac{e^n}{2 \pi \sqrt{n} n^n} \int_{- \pi \sqrt{n}}^{\pi \sqrt{n}} e^{n \left(e^{\frac{i\theta}{\sqrt{n}}}-\frac{i\theta}{\sqrt{n}}-1\right)} \text{d} \theta,$$
where $\theta =t \sqrt{n}$. Hitherto, we have an exact formula; note that we meet again the "exponential of exponential". Now comes the leap of faith. For $x$ close to $0$, the value of $e^x-x-1$ is roughly $x^2/2$. Moreover, the bounds of the integral get close to $- \infty$ and $ \infty$. Hence, for large $n$, we have:
$$\frac{1}{n!} \sim \frac{e^n}{2 \pi \sqrt{n} n^n} \int_{- \infty}^{+ \infty} e^{\frac{n}{2} \left(\frac{i\theta}{\sqrt{n}}\right)^2} \text{d} \theta = \frac{e^n}{2 \pi \sqrt{n} n^n} \int_{- \infty}^{+ \infty} e^{-\frac{\theta^2}{2}} \text{d} \theta = \frac{e^n}{\sqrt{2 \pi n} n^n}.$$
Of course, it is not at all trivial to prove that the equivalents we took are rigorous. Indeed, if one apply this method to bad generating functions (e.g. $(1-z)^{-1}$), they can get false results. However, this can be done for some admissible functions, and the exponential is one of them.
I have learnt this method thanks to Don Zagier. It is also explained in Generatingfunctionology, Chapter $5$ (III), where the author credits Hayman. The original reference seems to be A generalisation of Stirling's formula (Hayman, 1956), but I can't read it now.
One of the advantage of this method is that it becomes very easy to get the next terms in the asymptotic expansion of $n!$. You just have to develop further the function $e^x-x-1$ at $0$. Another advantage is that it is quite general, as it can be applied to many other sequences.
