Stirling’s Approximation for n!

Abraham deMoivre discovered the following formula:

StirlingApproximation[n_] := (Sqrt[2π n])((((n/E)))^n)

which is a surprisingly good approximation to n!. We can test this informally:

Table[{n,n!,1. StirlingApproximation[n]},{n,1,6}] // TableForm

And make a more convincing graph by taking:

Show[{ListPlot[Table[((StirlingApproximation[n])/(n!)),{n,1,30}]],Plot[1,{x,0,30}]},PlotRange->All,AxesOrigin->{0,0}]