My new book of maths puzzles is on its way! It’s packed full of interesting problems to sink your teeth into. I’ll post an update as the launch approaches.

In the meantime, here is a fantastic problem from the USA:

*It is given that is a 604-digit number beginning with a 1. How many of the numbers begin with a 4?*

On the face of it, the fact that this can even be solved in a reasonable length of time is astonishing. There are so many numbers in that list! And yet, the solution is remarkably simple.

The first idea is to consider how the first digit of a number changes when you double the number. After some thought, we arrive at the following possible ‘first digit chains’:

1,2,4,8,1…

1,2,4,9,1,…

1,2,5,1,…

1,3,6,1,…

1,3,7,1,…

Notice that we keep coming back to a first digit of 1, whatever other first digits appear in the chain. But the crucial observation is that the digit 4 appears precisely in the long chains, and never in the short chains.

So, in moving through the powers of 2 from to , the first digits appear in blocks of length four (1,2,4,8,… or 1,2,4,9,…) or length three (1,2,5,… or 1,3,6, … or 1,3,7,…). Furthermore, the number of times the first digit 4 appears is equal to the number of chains of length four.

But all this information can be summarised in one pair of equations! If we let and be the number of four-chains and three-chains respectively, then we have

(since every chain represents an increase of one digit in the length of the number )

and

(since there are 2004 terms from to $2^{2003}$.

Solving simultaneously yields , so the number of terms beginning with the digit 4 is **195**.

The problem is utterly brilliant. I’ve seen many questions in which one has to form their own simultaneous equations, but rarely have I seen one of such creative invention.

### Like this:

Like Loading...

*Related*