4
$\begingroup$

How to obtain the number of digits in $n!$ ?

My approach :

I Used Stirling's formula to find out the approximate value of $n!$

Let the approximate value be $S$

Thus, number of digits in $\ = \left \lfloor \log S \right \rfloor$ + 1

where $\left \lfloor . \right \rfloor$ is floor function.

$\endgroup$
5
$\begingroup$

The question came up here on MathOverflow.

$\endgroup$
  • $\begingroup$ Great! What a coincidence! $\endgroup$ – Bazinga Jun 29 '12 at 12:28
3
$\begingroup$

Number of digits in $n!=1+$ $\left \lfloor \log(n!) \right \rfloor$. Now $\log(n!)=\log(1)+\log(2)+...+\log(n)$. Therefore, Number of digits in $n!=$ $1+ \left \lfloor \sum_{1}^{n}\log(k) \right \rfloor$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.