# What is the largest number whose first digits can be calculated? [duplicate]

The way to calculate the first digits of $a^b$ is to compute the $log_{10} a$ and multiply by $b$, and find the fractional part. But if there are too many digits in the integer part of the result, then the digits after the point are inaccessible. By too many digits I mean enough digits to overflow a computer's memory. So this question boils down to, how many digits can be represented in a computer's memory?

The largest number I have ever computed the first digits of is $2^{2^{2^{32}}}$ which begins with 315921269337233843004... and has more than $9.34*10^{1292913985}$ digits. It took literally almost all my computer's RAM and 30 hours of my time to calculate.

Is there any hope of eventually finding the first digits of, say, $3^{3^{3^{3^3}}}$ at some point?

• cs.stackexchange.com Feb 21, 2018 at 18:11
• I know the first and last digits of $10^{10^{10^{17}}}$...
– MJD
Feb 21, 2018 at 18:37
• The “duplicate” of this question explicitly has a different answer than this one. I believe they are substantially different even though the OP did not intend them to be different. Feb 22, 2018 at 3:42

If you used up all your RAM, then I suspect you did not use a spigot algorithm for extracting the 4 billionth binary digit of $\ln 2$?
Spigot algorithms use only a small amount of RAM, because the calculations (though still time-intensive) should only require a logarithmic level of precision, maybe kilobytes rather than gigabytes. So it is not necessary to represent the entire number $2^{2^{32}} \ln 2$ just to get access to the first few digits of its fractional part.
Naively it seems to me that the $\ln 2$ spigot algorithm is at least as efficient as spigot algorithms for $\pi$ and equally parallelizable, and those already reached the 10 quadrillionth bit fairly recently, with only a modest amount of modern computational power (a few dozen desktop computers for a few months).
So with more dedicated resources (imagine this was the next Bitcoin craze) one could probably compute the sextillionth binary digit of $\ln 2$, which would allow one to extract initial digits for $2^{2^{2^{70}}}$ or so.
I’m aware that there are spigot algorithms for other logarithms in other bases but I’m unfamiliar with the particulars. Assuming that ternary digits of $\ln 3$ are roughly as efficient as binary digits of $\ln 2$, then $3^{3^{3^{3^3}}}$ is definitely attainable.