Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
    
See also stackoverflow.com/questions/1113167/…. –  lhf Jun 29 '12 at 12:07

2 Answers 2

up vote 5 down vote accepted

The question came up here on MathOverflow.

share|improve this answer
    
Great! What a coincidence! –  Bazinga Jun 29 '12 at 12:28

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$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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