Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The full question is:

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


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

share|cite|improve this question
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. – Hurkyl Dec 27 '12 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 ? – Anona anon Dec 27 '12 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. – Thomas Andrews Dec 27 '12 at 16:07
hello thomas :) how did you calculate that? – Anona anon Dec 27 '12 at 17:53
up vote 3 down vote accepted

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.

share|cite|improve this answer
thank you for that Christian Blatter, however this calculation for this is to be done manually. thanks alot anyway :) – Anona anon Dec 27 '12 at 17:52

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.

share|cite|improve this answer
Instead of "number $m$", I believe you mean "positive integer $m$". – Cameron Buie Dec 27 '12 at 16:00

$\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.

share|cite|improve this answer
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... – Anona anon Dec 27 '12 at 17:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.