What's the first power of two for which the most significant digit is 7?

I was just reading an anecdote about a third-grade student who was asked by her math teacher to find a number which, when two is raised to the power of that number, produces a number that starts with the digit 7 (in base 10, as the context makes clear).

I was able to quickly write a one-liner in Perl that found the smallest such number, 46, which is also the number ultimately found by the student. But the story states that the question was given in a math class, and implies that the student found the answer without the aid of a computer.

I haven't been able to come up with an avenue of attack for this problem that doesn't depend on a computer, much less one that a third-grader, even at a relatively advanced level of mathematics, might discover. So how can this be done?

In the more general case, it would be nice to see a solution to the problem of "Given an integer $b$ and digit $d$, what's (a/the smallest) power $n$ such that $b^n$ has leading digit $d$ in base 10?"


Solution 1:

It is not all that hard, if we remember the frequently useful $2^{10}=1024$, which is $2.4$ percent more than $1000$.

The small power of $2$ that is closest to beginning with $7$ is $2^6$, which is $64$. We need to increase $64$ by a bit under $10$ percent, times a power of $10$. But since we are concerned only about the first digit, we don't really even see the powers of $10$, intuitively we just want to push from $6.4$ to $7$.

It is easy to see that pushing up twice by $2.4$ percent is not enough to push us up to beginning with $7$. That doing it three times is not enough is less obvious, but a bit of fooling around, even without a calculator, does the job: although the compounding helps, $2.4$ percent three times does not give $10$ percent. It is clear that increasing $64$ by $2.4$ percent four times will get us to the $7$, and leaves us quite far from beginning with $8$. So the required power is $6+(10)(4)$.

The starting digit that takes longest to reach is $9$. This is trickier to do by hand, for $2^{53}$ barely gets us there. It is the first legitimate candidate, but calculations have to be more accurate than for the digit $7$, to make sure that we don't need to go up to $63$.

Solution 2:

I don't want to dismiss the possibility that some third-grader understands enough about exponents to solve this, but I think it's more likely that the question was presented differently than the way it's described. Third grade is usually when students learn multiplication, and this exercise is really just about multiplying by 2:

Exercise: Multiply 2 x 2. Then multiply the answer again by 2. How many times do you have to multiply by 2 until the first digit of the answer is 7?

It's an interesting way to practice multiplication by 2 on a series of problems, and I don't think 46 iterations would take unreasonably long to do by hand. Except for the fact that the numbers get longer as you go along, it's not more than 2 pages of homework.

Granted, not all third-graders would have the patience, but I'm sure some kids would love to grind away on a repetitive problem like this because it's big (the final number is 14 digits long!), but it's still within their ability.