Math Puzzle: Count the Digits

If you were to list all the natural numbers from 1 to 1,000,000,000, which digit would you have to write least often and which would you have to write most often?

First, we look at the whole numbers from 0 to 999,999,999 and add leading zeros so that they all have nine digits. This gives us one billion numbers (000,000,000, 000,000,001,..., 999,999,999). Each digit appears equally often in each position. This set of a billion numbers therefore consists of 109 / 10 × 9 = 9 × 108 zeros, ones, twos ... and nines. If we now take away 000,000,000 and add the number 1,000,000,000, the number of zeros remains the same, while the number of ones increases by one. If we discard the leading zeros, the number of zeros decreases significantly, but the number of other digits does not change. Therefore, if you list all the numbers from 1 to 1,000,000,000, you have to write 0 the least often and 1 the most often.

We’d love to hear from you! E-mail us at games@sciam.com to share your experience.

This puzzle originally appeared in Spektrum der Wissenschaft and was reproduced with permission.

0