Using Wallis' formula to show the limit of $a_n:=n!\left(\frac{e}{n}\right)^n n^{-1/2}.$

Let $$a_n:=n!\bigg(\frac{e}{n}\bigg)^n n^{-1/2}.$$

With the help of Wallis' formula $$\frac{\pi}{2} = \prod_{n=1}^\infty \frac{4n^2}{4n^2-1}=\lim_{m\to \infty}\frac{2^{4m}(m!)^4}{((2m)!)^2 (2m+1)}$$ show that the limit of $a_n$ is $\sqrt{2\pi}$.

I don't have any idea on how to derive the limit from this formula. I would greatly appreciate any hints or solutions.


Obviously, using the Stirling Approximation will get the job done quickly, but I am guessing that the purpose of this problem is to provide an alternative proof of the Stirling Approximation. My work consists of two parts. The first part is to get the limit of $a_n$ as $n\to\infty$, assuming that the limit exists (and is finite). The second part is to verify that the limit does indeed exist and is a positive real number.

Note that $$\frac{a_m^4}{a_{2m}^2}=\frac{\left(\frac{m!}{\sqrt{m}}\,\left(\frac{\text{e}}{m}\right)^m\right)^4}{\left(\frac{(2m)!}{\sqrt{2m}}\,\left(\frac{\text{e}}{2m}\right)^{2m}\right)^2}=\frac{2^{4m+1}\,(m!)^4}{\big((2m)!\big)^2\,m}\text{ for all }m=1,2,3,\ldots\,.$$ Therefore, $$\lim_{m\to\infty}\,\frac{a_m^4}{a_{2m}^2}=\lim_{m\to\infty}\,\frac{2^{4m+1}\,(m!)^4}{\big((2m)!\big)^2\,m}=\left(\lim_{m\to\infty}\,\frac{2^{4m}\,(m!)^4}{\big((2m)!\big)^2\,(2m+1)}\right)\,\left(\lim_{m\to\infty}\,\frac{2(2m+1)}{m}\right)\,.$$ Using Wallis's Formula, we get $$\lim_{m\to\infty}\,\frac{a_m^4}{a_{2m}^2}=4\,\left(\frac{\pi}{2}\right)=2\pi\,.$$

Therefore, if $L:=\lim\limits_{m\to\infty}\,a_m$ exists and is a postive real number, then we get $$L^2=\frac{L^4}{L^2}=\frac{\lim\limits_{m\to\infty}\,a_m^4}{\lim\limits_{m\to\infty}\,a_{2m}^2}=\lim_{m\to\infty}\,\frac{a_m^4}{a_{2m}^2}=2\pi\,,$$ whence $L=\sqrt{2\pi}$. We now need to show that $L$ exists. First, observe that $$\ln\left(a_m\right)=1-\left(\int_1^m\,\ln(x)\,\text{d}x-T_m\right)\,,$$ where $$T_m:=\frac{1}{2}\,\ln(1)+\sum_{k=2}^{m-1}\,\ln(k)+\frac{1}{2}\,\ln(m)$$ is the trapezoidal approximation with $m+1$ equidistant nodes for the integral $I_m:=\displaystyle\int_1^m\,\ln(x)\,\text{d}x$. Write $E_m:=I_m-T_m$.

Note that $E_m>0$ for each $m$ (since $\ln$ is concave). Furthermore, $$E_{m+1}-E_{m}=\left(I_{m+1}-I_m\right)-\left(T_{m+1}-T_{m}\right)=\small\int_m^{m+1}\,\ln(x)\,\text{d}x-\frac{1}{2}\,\ln(m)-\frac{1}{2}\,\ln(m+1)\,.$$ Therefore, $$E_{m+1}-E_m=\left(m+\frac{1}{2}\right)\,\ln\left(1+\frac{1}{m}\right)-1\,.$$ Because $$ t-\frac{t^2}{2}+\frac{t^3}{3}-\frac{t^4}{4}\leq \ln(1+t)\leq t-\frac{t^2}{2}+\frac{t^3}{3}$$ for $t\geq 0$ (this is due to Taylor's Theorem), we see that $$E_{m+1}-E_m\geq \left(m+\frac{1}{2}\right)\left(\frac{1}{m}-\frac{1}{2m^2}+\frac{1}{3m^3}-\frac{1}{4m^4}\right)-1=\frac{1}{12m^2}-\frac{1}{12m^3}-\frac{1}{8m^4}$$ and $$E_{m+1}-E_m\leq \left(m+\frac{1}{2}\right)\left(\frac{1}{m}-\frac{1}{2m^2}+\frac{1}{3m^3}\right)-1=\frac{1}{12m^2}+\frac{1}{6m^3}\,.$$ That is, if $m\geq 2$, $$\frac{1}{96m^2}\leq E_{m+1}-E_m\leq \frac{1}{6m^2}\,.\tag{*}$$ In fact, $E_2-E_1=\frac{3}{2}\,\log(2)-1$ also satisfies (*). This means $E_1,E_2,E_3,\ldots$ form an increasing sequence with upper bound $$\sum_{m=1}^\infty\,\frac{1}{6m^2}=\frac{\zeta(2)}{6}=\frac{\pi^2}{36}<\infty\,,$$ where $\zeta$ is the Riemann zeta function. This shows that $\lim\limits_{m\to\infty}\,E_m=\sup\left\{E_1,E_2,E_3,\ldots\right\}$ exists and is finite.

Recall that $\ln\left(a_m\right)=1-E_m$ for all $m=1,2,3,\ldots$. The paragraph above shows that $\lim\limits_{m\to\infty}\,\ln\left(a_m\right)$ exists and is finite. That is, $L=\lim\limits_{m\to\infty}\,a_m$ also exists and is finite. Because $$L=\exp\left(1-\lim\limits_{m\to\infty}\,E_m\right)\,,$$ it is a positive real number (well, this is kind of obvious without using the limit $\lim\limits_{m\to\infty}\,E_m$). The proof is now complete.