# What is the sum of number of digits of the numbers $2^{2001}$ and $5^{2001}$

What is the sum of number of digits of the numbers $$2^{2001}$$ and $$5^{2001}$$? (Singapore 1970)

I attempted to solve this question by working out what each digit must be, and maybe find some pattern, but I couldn't find any, apart from the fact that $$2^{2001}\mod{10}\equiv 4$$ and $$2^{2001}\pmod{10}\equiv 5$$. Could you please explain to me how to solve this question? This question is multiple choice with options $$1999, 2003, 4002, 6003, 2002$$

• @samerivertwice yes base 10 Mar 15 at 17:15
• Not hard to do with a computer program, but perhaps that's not allowed. Mar 15 at 17:18
• @Sil I am certain that that is what the question asks Mar 15 at 17:36
• @Sil I'll ask the author for an explanation, as soon as I get a response, I'll post it here Mar 15 at 18:05
• @sil I worked it out given the multi choice 😉 Mar 15 at 18:08

It's $$2002$$. It's asking for the sum of the number of digits of $$2^{2001}$$ and $$5^{2001}$$ in base $$10$$, so just take the log base $$10$$ of each, take the ceiling function and hey presto:

$$603+1399=2002$$

• remark: without taking the ceiling function, $$2001\log_{10}(2)+2001\log_{10}(5) = 2001(\log_{10}(2)+\log_{10}(5)) = 2001\log_{10}(10) = 2001$$ so no calculator is needed to know the answer is in $[2001,2003)$ Mar 15 at 18:14
• "the sum of the number of digits" Well, that's just nasty..... Mar 15 at 18:16
• @hgmath nice. I figured there was something like that although I just used the calculator ;) Mar 15 at 18:17
• @samerivertwice your solution is brilliant, thank you very much Mar 15 at 18:18
• @MichaelBlane for the logarithm I just used a calculator. If needed to do without a calculator this can be done, using an infinite series for the log function but the real magic is in hgmath's comment - if you want to learn something, that comment is the thing to think about. Mar 15 at 18:20

It looks like you don't need logarithms or any calculator to solve this problem. Let's start.

First, observe that the following inequalities hold:

$$10^m<\underbrace {2^{2001}}_{m+1 ~ \text{digits}}<10^{m+1}$$

$$10^n<\underbrace{5^{2001}}_{n+1 ~ \text{digits}}<10^{n+1}$$

You get,

$$10^{m+n}<10^{2001}<10^{m+n+2}$$

$$2001=m+n+1$$

$$m+n=2000$$

Finally, the sum of digits of $$2^{2001}$$ and $$5^{2001}$$ is equal :

\begin{align}\color {gold}{\boxed {\color{black}{m+1+n+1=m+n+2\\ \qquad \qquad \qquad\thinspace=2000+2 \\\qquad \qquad \qquad \thinspace=2002.}}}\end{align}

The answer is $$\overbrace{\lfloor2001\log_{10}(2)\rfloor+1}^\text{digits in 2^{2001}}+\overbrace{\lfloor2001\log_{10}(5)\rfloor+1}^\text{digits in 5^{2001}}$$ However, we also have, using Iverson Brackets, $$\lfloor x\rfloor+\lfloor y\rfloor=\lfloor x+y\rfloor-[\{x\}+\{y\}\ge1]$$ So we need to know $$\{2001\log_{10}(2)\}+\{2001\log_{10}(5)\}$$, but since $$2001\log_{10}(2)+2001\log_{10}(5)=2001$$, we know that the sum of their fractional parts is exactly $$0$$ or exactly $$1$$. Since the fractional parts are both positive, we must have exactly $$1$$.

Therefore, \begin{align} \lfloor2001\log_{10}(2)\rfloor+1+\lfloor2001\log_{10}(5)\rfloor+1 &=\lfloor2001\log_{10}(2)+2001\log_{10}(5)\rfloor+1\\ &=2002 \end{align}

• I see that I answered the question after it was edited to be correct. It was probably that edit which brought this question to the top of the front page just as I was looking.
– robjohn
Mar 15 at 22:09

Generalization of the problem:

• What is the sum of number of digits of the numbers $$2^N$$ and $$5^N$$?

$$10^m<\underbrace {2^{N}}_{m+1 ~ \text{digits}}<10^{m+1}$$

$$10^n<\underbrace{5^{N}}_{n+1 ~ \text{digits}}<10^{n+1}$$

$$10^{m+n}<10^{N}<10^{m+n+2}$$

$$N= m+n+1$$

$$m+n=N-1$$

The sum of digits of the numbers $$2^{N}$$ and $$5^{N}$$ will be equal :

\begin{align}\color {gold}{\boxed {\color{black}{m+1+n+1=m+n+2\\ \qquad \qquad \qquad\thinspace=N-1+2 \\\qquad \qquad \qquad \thinspace=N+1.}}}\end{align}

• Short answer: $$N+1$$ digits.