\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
%\usepackage{slide-article}
\usepackage{slide-article-tom}
\ifx\pdfoutput\undefined
     \usepackage[dvips]{graphicx}
\else
     \usepackage[pdftex]{graphicx}
%%     \usepackage{type1cm}
%%     \usepackage{color}
     \pdfcompresslevel9
\fi
%  \usepackage{epsfig}
%\usepackage{graphics}
\usepackage{hyperref}

%\definecolor{Emerald}{cmyk}{1,0,0.50,0}
\hypersetup{colorlinks,
            linkcolor=blue,
            %pdfpagemode=FullScreen
            pdfpagemode=None
            }


%\usepackage{hyper}
%\usepackage{hthtml}
%\def\hyperref#1#2#3#4{\hturl{#1}}

\def\pagedone{\newpage}

\def\tthdump#1{#1}

\tthdump{\def\sectionhead#1{\begin{center}{\LARGE\hypertarget{#1}
     {#1}\hyperlink{Our general topics:}{\hfil$\leftarrow$}}\end{center}}}
     
%%tth:\def\sectionhead#1{{\LARGE#1\hypertarget{#1}{#1}}
%%tth:     \special{html: <A NAME="#1"></A><a href="\#Top of file">       Top</a>}}

\tthdump{\def\quotesection#1{\begin{center}{\LARGE\hypertarget{#1}
     {#1}\hyperlink{The quotes}{\hfil$\twoheadleftarrow$}}\end{center}}}
     
%%tth:\def\quotesection#1{{\LARGE#1\hypertarget{#1}{#1}}
%%tth:     \special{html: <A NAME="#1"></A><a href="\#The quotes">       <-</a>}}

%%tth:\def\makehyperlink#1{\special{html: <a href="\##1">}{\large#1}\special{html: </a>}}

%%tth:\def\binom#1#2{\left(\begin{array}{c}#1\\#2\end{array}\right)}

%\def\sectionhead#1{\begin{center}{\LARGE #1}\end{center}}
%\def\sectionhead#1{\section{#1}}

% defines a 2 element column vector.
\def\col#1#2{\left(\begin{array}{c}#1\\#2\end{array}\right)}
\def\tcol#1#2{(#1, #2)^T}

% defines the expectation operator.
\def\expect#1{\langle #1 \rangle}

%%%\def\bigep{{\Large{$\varepsilon$}}}

\begin{document}
\raggedright
%%tth:\special{html: <A NAME="Top of file"></A>}

\pagestyle{myfooters}
%\pagestyle{plain}

\thispagestyle{empty}
%      Since this involves a lot of formulas it's written using TeX
%
%         Charles Blair [BITNET:CEBLAIR@UIUCVMD]
%         (submitted to the Monthly)
%
\par This derivation of Stirling's approximation (including 
upper and lower bound) uses infinite series for logarithms
instead of integrals.
\def\otn{\sum_1^{n-1}} \def\frac#1#2{{{#1}\over{#2}}}
\def\nin{\sum_n^\infty} \def\mess{\frac{k-9}{120k^4(k+1)}}
\def\omess{\left(\frac1{L+1}-\frac1{2L}\right)}
$$\align{
\ln\ n!&=n\ln\ n-\sum_{k=1}^{n-1} k\ln\left(1+\frac1k\right)=
n\ln n+\sum_{L=1}^\infty\left(\sum_{k=1}^{n-1}k(-1)^L\frac{k^{-L}}L\right)\cr
&=n\ln\ n-(n-1)+\frac12\otn k^{-1}-\frac13\otn k^{-2}+\dots\cr}$$
\par Approximate $\sum k^{-1}$ using
$$\ln\ n=\otn \ln\left(1+\frac1k\right)=\otn k^{-1}-\frac12\otn k^{-2}+\dots$$
\par When we group according to powers of $k$ we get:
$$\ln\ n!=n\ln\ n-(n-1)+\frac12\ln\ n +\left(\frac14-\frac13\right)%
\otn k^{-2}+\left(-\frac16+\frac14\right)\otn k^{-3}+\dots$$
$$\hbox{Let:}\quad S=\left(n+\frac12\right)\ln n-(n-1)\quad
M_L=\sum_{k=1}^\infty k^{-L}\quad
M=\sum_{L=2}^\infty(-1)^L\omess M_L$$
$$\eqalign{\ln n!&=S-\frac1{12}\left(M_2-\nin k^{-2}\right)
-\sum_{L=3}^\infty(-1)^L\omess\left(M_L-\nin k^{-L}\right)\cr
&=S-M+\frac1{12}\nin k^{-2}-\frac1{12}\nin k^{-3}%
+\frac3{40}\nin k^{-4}-\frac1{15}\nin k^{-5}+\dots\cr}$$
$$\hbox{Since }\quad \frac1{12k^2}-\frac1{12k^3}+\frac3{40k^4}=
\frac1{12}\left(\frac1k-\frac1{k+1}\right)-\mess$$
$$S-M+\frac1{12n}-\nin\mess > \ln\ n! > S-M+\frac1{12n}-\nin\mess
-\nin\frac1{15k^5}$$
For $n\ge 9$, $\ln n!<S-M+1/12n$ is immediate.  For a lower bound,
we can use $$\mess+\frac1{15k^5}=\frac{k^2-k+8}{120k^5(k+1)}<
[k\ge9]\quad \frac1{120k^3(k+1)}<\frac1{360}\left(\frac1{(k-1)^3}-%
\frac1{k^3}\right)$$
to obtain $\ln n!>S-M+1/(12n)-1/(360(n-1)^3)$.
\par To determine $M$, the usual argument involving Wallis' product
can be used:
$$\lim_{n\to\infty}\frac{4^n(n!)^2}{\sqrt{2n}(2n!)}=\lim\frac{2\cdot
4\cdot6\dots(2n-2)\sqrt{2n}}{3\cdot5\dots(2n-1)}=\sqrt{\frac\pi2}=
e^{1-\ln 2-M}\hbox{ So: }e^{-M}=\frac{\sqrt{2\pi}}e$$
\bye


\end{document}
