# Find the number of digits, $D$, in the decimal expansion of the large number $N=4^{4^{4^{4}}}$

The full question is:

Find the number of digits, $D$, in the decimal expansion of the large number

$$N=4^{4^{4^{4}}}$$

Try and find the most efficient ways of finding $D$.

I know that $4^{4^{4^{4}}}$ computes a very large number i.e. $4^{4^{256}}$. I'm not sure how to go about working out both the decimal expansion and finding the number of digits $D$ in the question. Please can someone kindly help! thank you

• The first thing to do is to eliminate the idea of "working out the decimal expansion" from your thinking. As you've observed, this is going to be a very large number; it's too large for you to be able to do such a thing. Turns out even the number of digits is too large to compute its decimal expansion: you need to find a way to find and represent the number of digits without writing their decimal expansions.
– user14972
Dec 27, 2012 at 15:37
• Hello Hurkyl :) I understand what you are saying but the question is asking for the number of digits in the decimal expansion is it not? is there a specific forumla of any sort or an algebraic expression that will help me compute the number of digits in a particular decimal expansion ? Dec 27, 2012 at 15:50
• Does the source of this problem really ask you to compute exactly $D$? If so, that's gonna be hard. $D$, written in binary, will be $512$ digits long. Dec 27, 2012 at 16:07
• hello thomas :) how did you calculate that? Dec 27, 2012 at 17:53

Hint: since the number of digits of any number $m$ is $\lfloor \log_{10} m \rfloor +1$, you can compute the base $10$ log of $N$, which is a much smaller number.

• Instead of "number $m$", I believe you mean "positive integer $m$". Dec 27, 2012 at 16:00

The number of digits is

\eqalign{&80723047260282253793826303970853990300713679217387430318\cr&67082828418414 48156830914919 891181470122948345198\cr&15575747711564964572385352990874812 44990261351117\ .\cr}

I got this by asking for ${\tt IntegerPart[2^{513}\ Log[10,2]]+1}$ in Mathematica.

• thank you for that Christian Blatter, however this calculation for this is to be done manually. thanks alot anyway :) Dec 27, 2012 at 17:52

$\log_{10}N=4^{4^4}\log_{10}4$, so $\log_{10}\log_{10}N=4^4\log_{10}4+\log_{10}\log_{10}4\approx153.906997548$, and $\log_{10}N\approx 10^{153.906997548}\approx8.072304726028\times 10^{153}$; this is the approximate number of decimal digits in $N$. I did this on the Excalibur RPN calculator app, and I see that it agrees with Christian Blatter’s exact result within the limits of its precision; you’re probably not going to do much better than this without using a very high precision package.

• I understand that the number of digits/decimal expansions is practically impossible to calculate manually which is why I think I need to come up with an algebraic expression or a formula of some sort that represents a way to find D. I'm not sure if that makes any sense... Dec 27, 2012 at 17:55