5

To be specific, what is the best way to calculate the first 10 digits decimal approximation of $$ \large \left(123456789^{123456789}\right)^{123456789}$$?

Even WolframAlpha gives the result in a power of 10 representation as $$ \large 10^{10^{10^{1.232768993649683}}}$$ Is there any other ways to approximate the acceptable first 10 digits in decimal?

Surb
  • 55,662
neat
  • 51
  • For even much smaller numbers, this kind of calculations lead to overflows.$(123^{123})^{123}=1.494276501\times 10^{31618}$; $(1234^{1234})^{1234}=5.097061859\times 10^{4707318}$ – Claude Leibovici Aug 18 '14 at 10:40
  • $$ \large 12345678^{12345678^{12345678}} = 3.1105366961^{10^{1080858677412101}} $$ – neat Aug 18 '14 at 10:52
  • How did you get it ? – Claude Leibovici Aug 18 '14 at 10:53
  • You can use multiple precision arithmetic (big number libraries) on a computer. This might help but I don't know the required computation time or limits. Here is one: link –  Aug 18 '14 at 10:55
  • @ClaudeLeibovici query in WolframAlpha. – neat Aug 18 '14 at 10:56
  • @i.ozturk Thanks for the link. – neat Aug 18 '14 at 10:58
  • Your notation and use of the power ^ is ambiguous. Here an example with smaller numbers $2^{(3^4)}= 2417851639229258349412352,;$ but your question is about $(2^3)^4 = 4096.;$ Please clarify. – gammatester Aug 18 '14 at 11:05
  • @gammatester sorry doesn't seem able to edit my own comment. What I meant was http://www4a.wolframalpha.com/Calculate/MSP/MSP1111gb8f586fc2ggc490000131d18i05aa61801?MSPStoreType=image/gif&s=52&w=296.&h=40. – neat Aug 18 '14 at 11:33

2 Answers2

2

Let $m = (n^n)^n = n^{n^2}$. Then, taking logarithms in base 10, $\log{m} = n^2 \log{n}$. Therefore we can write

$$ m = s \cdot 10^p$$ where $s \in (1,10)$ is given by exponentiating the fractional part of $n^2 \log{n}$, and $p$ is the integer part of $n^2 \log{n}$. The leading ten digits of $m$ are encoded in $s$.

Christopher A. Wong
  • 22,445
  • 3
  • 51
  • 82
  • 3
    The question is apparently: How good must we approximate the log in order to obtain enough significant digits? Since $n^2$ kills about 20 digits and we want 10 (and log and exp are relatively harmless), we should start by computing $\log_{10}1.23456789$ to about $30$ decimal places ... – Hagen von Eitzen Aug 18 '14 at 10:53
  • That's a good point. I am not an expert on state-of-the-art approximation methods for standard functions. Such methods are pretty well-understood, I'm led to believe, so I guess somebody could add some references to such methods if they have the time. – Christopher A. Wong Aug 18 '14 at 11:07
1

With $n=123456789$ the first 10 decimal digits of $m=(n^n)^n=n^{n^2}$ can be computed as follows (using Pari/GP with 60 decimal digit precision):

$$a = \log_{10}m = n^2 \log_{10}n$$ $$a=123327462732871491.130863690559566545920203026360790125577391$$ (The integer part of $a$ explains the $1.23327\times 10^{17}$ decimal digits from your Wolfram link). The leading digits of $m$ come from the fractional part $f$ of $a$ $$f \approx0.130863690559566545920203026360790125577391$$ and are computed as $10^f$

$$m=10^f\times 10 ^{123327462732871491}$$ $$m\approx 1.351648262765413474237868427278 \times 10^{123327462732871491}.$$

Thus the leading 10 digits of $(123456789^{123456789})^{123456789}$ are $1351648262.$


Here an example with smaller $n=7$ where you can see the complete number $m=(n^n)^n$ $$m=256923577521058878088611477224235621321607$$ $$a = \log_{10}m = n^2 \log_{10}n=41.40980396069858470489859667103917348$$ $$10^f=2.569235775210588780886114772242356213216070000$$

gammatester
  • 18,827