Factorial of a large number

Algebra Level 2

Evaluate the factorial ( 1 0 23 ) ! = 1 0 1 0 X (10^{23})! = 10^{10^X} What is the value X X (exponent of the exponent)? Specifies the result with an accuracy of 2 decimal places.

Hint: You can use Stirling's formula N ! N N e N 2 π N , N 1 N! \approx N^N e^{-N} \sqrt{2\pi N}, \quad N \ggg 1 Beware of exponential overflow errors!


The answer is 24.35.

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

Markus Michelmann
Dec 18, 2017

To solve this task you need the rules of calculation for the logarithm: log ( exp ( x ) ) = x log ( x y ) = log ( x ) + log ( y ) log ( x a ) = a log ( x ) log a ( x ) = log ( x ) log ( a ) \begin{aligned} \log(\exp(x)) &= x \\ \log(x \cdot y) &= \log(x) +\log(y) \\ \log(x^a) &= a \log(x) \\ \log_a(x) &= \frac{\log(x)}{\log(a)} \end{aligned} By logarithmising the Stirling formula it translates into a usable form, that does not cause any overflow errors in the computation: N ! N N e N 2 π N log ( N ! ) log ( N N ) + log ( e N ) + log ( N ) + log ( 2 π ) = N log ( N ) N + 1 2 log ( N ) + log ( 2 π ) log ( 1 0 23 ! ) 23 1 0 23 log ( 10 ) 1 0 23 + 11.5 log ( 10 ) + log ( 2 π ) 23 1 0 23 log ( 10 ) 1 0 23 + O ( 10 ) log 10 ( 1 0 23 ! ) = log ( 1 0 23 ! ) log ( 10 ) 1 0 23 ( 23 1 log ( 10 ) ) X = log 10 ( log 10 ( 1 0 23 ! ) ) 23 + 1 log ( 10 ) log ( 23 1 log ( 10 ) ) 24.35 \begin{aligned} N! &\approx N^N e^{-N} \sqrt{2\pi N} \\ \log(N!) &\approx \log(N^N) + \log( e^{-N}) + \log( \sqrt{N}) +\log( \sqrt{2\pi})\\ &= N \log(N) - N + \frac{1}{2} \log(N) + \log(\sqrt{2\pi}) \\ \log(10^{23}!) &\approx 23 \cdot 10^{23} \log(10) - 10^{23} + 11.5 \log(10) + \log(\sqrt{2\pi}) \\ &\approx 23 \cdot 10^{23} \log(10) - 10^{23} + \mathcal{O}(10) \\ \log_{10}(10^{23}!) = \frac{\log(10^{23}!)}{\log(10)} &\approx 10^{23} \left(23 - \frac{1}{\log(10)}\right) \\ X = \log_{10}(\log_{10}(10^{23}!)) &\approx 23 + \frac{1}{\log(10)}\log\left(23 - \frac{1}{\log(10)}\right)\\ &\approx 24.35 \end{aligned}

P.S.: I just had to realize, that Wolfram Alpha delivers the finished solution directly, if you only type "(10^23)!" in the command line. That makes me a little sad.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...