TITLE: How much of Stirling is in Stirling's formula?
QUESTION [7 upvotes]: This is a naive question about history.
My understanding is that Stirling's formula or something trivially equivalent to it first appeared in an early edition of Abraham de Moivre's book The Doctrine of Chances (and maybe in a journal article he wrote before that?), provided that we understand "Stirling's formula" to mean that
$$
\lim_{n\to\infty} \frac{\sqrt{n}\cdot  n^n e^{-n}}{n!} = \text{some finite non-zero number}.
$$
If I'm not mistaken, de Moivre computed this number numerically and it was James Stirling who later showed just which number it is, and then de Moivre included it in a later edition of his book.
It's been a while since I read about all this and I don't remember enough detail to be 100% sure I've got all of the above right.
But today the term "Stirling's formula" seems to be used to refer to an asymptotic expansion.
How much of that series called "Stirling's formula" can be attributed to Stirling?  And who should get credit for what he shouldn't get credit for?

REPLY [2 votes]: Stirling's original result is the expansion
$$
\log n! \sim \left( {n + \frac{1}{2}} \right)\log \left( {n + \frac{1}{2}} \right) - \left( {n + \frac{1}{2}} \right) + \frac{1}{2}\log \left( {2\pi } \right) - \frac{1}{{24\left( {n + \frac{1}{2}} \right)}} +  \cdots ,
$$
as $n\to \infty$. De Moivre's version is that
$$
\log n! \sim \left( {n + \frac{1}{2}} \right)\log n - n + \frac{1}{2}\log \left( {2\pi } \right) + \frac{1}{{12n}} -  \cdots ,
$$
for large $n$. A nice reference for the topic is
A. Hald, A History of Probability and Statistics and Their Applications Before 1750.
John Wiley $\&$ Sons, New York, 1990.