Welcome 2018

How many digits are there in 2018 ! 2018! ?

Note:- - ! denotes factorial


The answer is 5795.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

The number of digits in a number m m can be calculated using the formula log ( m ) + 1 \lfloor{\log(m)}\rfloor +1

Stirling's approximation for n ! n! says that n ! 2 π n ( n e ) n . n! \approx \sqrt{2 \pi n}\left(\frac{n}{e}\right)^n.

Thus number of digits in n ! n! can be calculated using M + 1 \lfloor M \rfloor +1 where, M M is log ( 2 π n ) 2 + n log ( n / e ) \frac {\log(2 \pi n)}{2} + n\cdot \log(n/e)

Putting n = 2018 n=2018 we get the number of digits as 5795 \boxed{5795}

Clarification: e e is the Euler's number 2.71828 \approx2.71828 , \lfloor \cdot \rfloor is the Greatest Integer or Floor Function

Correction:

It seems to me that there is a small error in your solution:

The number of digits in the decimal expansion of a number m 0 m \ne 0 can be calculated using the formula log ( m ) + 1 \lfloor{\log(m)}\rfloor + 1

This formula is in reality equivalent to the one you have given, except for powers of 10:

For example, for m = 10 m= 10 , your formula gives log ( 10 ) = 1 = 1 \lceil{\log(10)}\rceil = \lceil{1}\rceil = \color{#D61F06}{1} .

Filip Rázek - 3 years, 6 months ago

Log in to reply

Thank you . Please see the corrections.

Mrigank Shekhar Pathak - 3 years, 6 months ago

Log in to reply

Great! Thanks for your problem!

Filip Rázek - 3 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...