Millionth powers
The Endeavour 2025-04-17
I was poking around Richard Stanley’s site today and found the following problem on his miscellaneous page.
Find a positive integer n < 10,000,000 such that the first four digits (in the decimal expansion) of n1,000,000 are all different. The problem should be solved in your head.
The solution is not unique, but the solution Stanley gives is n = 1,000,001. Why should that work?
Let M = 1,000,000. We will show that the first four digits of (M + 1)M are 2718.
This uses the fact that (1 + 1/n)n → e as n → ∞. If you’re doing this in your head, as Stanley suggests, you’re going to have to take it on faith that setting n = M will give you at least 4 decimals of e, which it does.
If you allow yourself to use a computer, you can use the bounds
to prove that sticking in n = M gives you a value between 2.718280 and 2.718283. So in fact we get 6 correct decimals, and we only needed 4.
There are many solutions to Stanley’s puzzle, the smallest being 4. The first four digits of 4M are 9802. How could you determine this?
You may not be able to compute 4M and look at its first digits, depending on your environment, but you can tell the first few digits of a number from its approximate logarithm.
log10 4M = M log10 4 = 602059.9913279624.
It follows that
4M = 10602059 100.9913279624 = 9.80229937666385 × 10602059.
There are many other solutions: 7, 8, 12, 14, 16, …