Number Theory – Accuracy of Stirling’s Formula for $n!$ Digits

number theory

It is known that the number of digits of a natural number $n > 0$, which represent by $d(n)$ is given by:

$d(n)= 1 + \lfloor\log n\rfloor\qquad (\text{I})$

($\log$ indicates $\log$ base $10$)

Well .. the classical approach to the Stirling factorial natural number $n > 1$ is given by:

$$n! \approx f(n) = [(2n\pi) ^{1/2}] [(n / e) ^ n]$$

The number of digits $n!$, according to equality (I), is:

$d(n!) = 1 + \lfloor\log n!\rfloor$

It seems to me that for all natural $n> 1$, $\log n!$ and $\log [f (n)]$ have the same floor:

$$\lfloor\log(n!)\rfloor = \lfloor\log(f(n))\rfloor$$

Here's my big question!

Therefore, we could write:

$$d (n!) = 1 + \lfloor\log(f(n))\rfloor$$

Hope someone has some little time for the theme.

Best Answer

6561101970383 is a counterexample, and the first such if I computed correctly. See my answer in https://mathoverflow.net/questions/19170 for more information.