# Solution to puzzle 122: Powers of 2 and 5

If the numbers 2^{n} and 5^{n} (where n is a positive integer) start with the same digit, what is this digit? The numbers are written in decimal notation, with no leading zeroes.

The key insight is to note that 2^{n} × 5^{n} = 10^{n}. From here, it is clear that if 2^{n} and 5^{n} begin with the same digit, that digit must be either 1 (if 2^{n} and 5^{n} are both powers of 10), or 3. Since n > 0, we reject the former case; hence the first digit must be 3. (If the first digit of 2^{n} is less than 3, then the first digit of 5^{n} must be greater than or equal to 3. If the first digit of 2^{n} is greater than 3, then the first digit of 5^{n} must be less than 3.)^{ }

More formally, if 2^{n} and 5^{n} begin with the digit d, then

- d · 10
^{r} < 2^{n} < (d + 1) · 10^{r}, and
- d · 10
^{s} < 5^{n} < (d + 1) · 10^{s}, for some non-negative integers r and s.

(We have strict inequality because, for n > 0, 2^{n} 0 (modulo 10) 2^{n} 0 (modulo 5), which is impossible by the Fundamental Theorem of Arithmetic. Similarly for 5^{n} 0 (modulo 10).)

Multiplying the inequalities, we obtain d^{2} · 10^{r+s} < 10^{n} < (d + 1)^{2} · 10^{r+s}.

Hence 1 d^{2} < 10^{n−r−s} < (d + 1)^{2} 100. (Since d is a decimal digit.)

It follows that n − r − s = 1, so that d^{2} < 10 < (d + 1)^{2}, and d = 3.

Therefore, if the numbers 2^{n} and 5^{n} (where n is a positive integer) start with the same digit, then that digit must be 3.

## Remarks

We did not prove above that there are any values of n for which 2^{n} and 5^{n} both begin with the same digit; we proved only that *if* such examples exist, *then* that digit must be 3. However, it is easily seen that such examples do exist. The first few cases are: n = 5, 15, 78, 88, 98, 108, 118, 181, 191, 201, 211, 274, 284, 294, 304, ... . Notice that there tend to be runs of several numbers with a difference of 10. This is because 2^{10} 10^{3} and 5^{10} 10^{7}.

## Further reading

- Online Encyclopedia of Integer Sequences: A088935

Source: Powers of 2 and 5 Puzzle, by Torsten Sillke

Back to top