Digits of 2^1000 and 5^1000 Written Side by Side
Write $2^{1000}$ and $5^{1000}$ next to each other in decimal -- just concatenate their decimal representations. How many digits does the resulting number have?
For example, if you concatenated $2^3 = 8$ and $5^3 = 125$, you would get the number $8125$, which has 4 digits.
Hints
- Think about what $2^{1000} \times 5^{1000}$ equals and what that tells you about the combined digit count.
- The number of digits of $n$ is $\lfloor \log_{10} n \rfloor + 1$. Use the fact that $\log_{10} 2 + \log_{10} 5 = 1$ to relate the digit counts of the two numbers.
- Since $2^{1000}$ is not a power of 10, the quantity $1000 \log_{10} 2$ is not an integer. Use the floor identity $\lfloor x \rfloor + \lfloor c - x \rfloor = c - 1$ for non-integer $x$ and integer $c$ to finish.
Worked Solution
How to Think About It: The first thing to notice is that $2^{1000} \times 5^{1000} = 10^{1000}$. This is the key. It means the number of digits in these two numbers must be tightly coupled -- together they almost "add up" to the digits of $10^{1000}$, which has exactly 1001 digits. So before doing any arithmetic, your gut should say: the answer is probably 1001 digits. Now let's verify that and see exactly why.
Quick Estimate: The number of digits of a positive integer $n$ is $\lfloor \log_{10} n \rfloor + 1$. We know $\log_{10} 2 \approx 0.30103$, so:
$$1000 \log_{10} 2 \approx 301.03$$
So $2^{1000}$ has $\lfloor 301.03 \rfloor + 1 = 302$ digits. Since $\log_{10} 2 + \log_{10} 5 = 1$, we get $1000 \log_{10} 5 \approx 698.97$, so $5^{1000}$ has $\lfloor 698.97 \rfloor + 1 = 699$ digits. Total: $302 + 699 = 1001$.
Approach: Show rigorously why $a + b = 1001$ without needing to know the decimal expansion of $\log_{10} 2$.
Formal Solution:
Let $a$ be the number of digits of $2^{1000}$ and $b$ the number of digits of $5^{1000}$. Then:
$$a = \lfloor 1000 \log_{10} 2 \rfloor + 1, \quad b = \lfloor 1000 \log_{10} 5 \rfloor + 1$$
So $a + b = \lfloor 1000 \log_{10} 2 \rfloor + \lfloor 1000 \log_{10} 5 \rfloor + 2$.
Let $x = 1000 \log_{10} 2$. Then $1000 \log_{10} 5 = 1000 - x$ (since $\log_{10} 2 + \log_{10} 5 = 1$). The key question is whether $x$ is an integer.
$x$ is an integer only if $2^{1000}$ is a power of 10, which is impossible since $2^{1000}$ is not divisible by 5. Therefore $x$ is not an integer, meaning $x$ has a nonzero fractional part, and the fractional parts of $x$ and $1000 - x$ sum to exactly 1. By the identity $\lfloor x \rfloor + \lfloor 1000 - x \rfloor = 999$ (when $x$ is not an integer), we get:
$$a + b = 999 + 2 = 1001$$
Answer: The concatenated number has $\boxed{1001}$ digits.
Intuition
The elegant move here is recognizing that $2^{1000}$ and $5^{1000}$ are complementary -- they multiply to $10^{1000}$. That product has 1001 digits, and the two factors must "share" those digits. If one gets $a$ digits and the other gets $b$, then roughly $a + b \approx 1001$. The precision comes from the floor function: $\lfloor x \rfloor + \lfloor c - x \rfloor = c - 1$ whenever $x$ is not an integer. The non-integer condition is exactly what saves us from an off-by-one error, and it holds here because no power of 2 can ever be a power of 10.
This style of reasoning -- find a product or sum that forces the answer, then handle the integer/non-integer boundary carefully -- shows up constantly in quant interviews and in practice whenever you are counting bits, digits, or precision levels in floating-point arithmetic. The broader lesson: when a problem involves two quantities that multiply to a round number, start by exploiting that product. It usually pins down the answer almost immediately.