## Friday, January 30, 2015

When last we saw Bad Johnny, he had written out all of the number words from ONE to ONE MILLION. Reader jeff correctly analyzed the situation in his comment. In Johnny's work there were 999,000 instances of the letter A. Moreover, the G's, X's, and W's were equinumerous, in view of the fact that EIGHT/EIGHTEEN/EIGHTY, SIX/SIXTEEN/SIXTY, and TWO/TWELVE/TWENTY are the only number-naming words that use these respective letters (one occurrence of the given letter in each case), and since the rules for assembling number names treat all three cases symmetrically.

That's a hand-waving argument, of course. A proof might go something like this:
1. Start by showing that for a number N with number word [N], the number of w's in [N] equals the number of 2's in N.
2. Hence, the total number of w's in the sequence ONE to ONE MILLION equals the total number of 2's in the sequence 1 to 1,000,000.
In like fashion,
1. Show that for a number N with number word [N], the number of x's in [N] equals the number of 6's in N.
2. Hence, the total number of x's in the sequence ONE to ONE MILLION equals the total number of 6's in the sequence 1 to 1,000,000.
Finally,
1. Show that the total number of 2's in the sequence 1 to 1,000,000 equals the total number of 6's in the sequence from 1 to 1,000,000.
2. Hence, the number of w's in the sequence ONE to ONE MILLION equals the number of x's in the sequence ONE to ONE MILLION.
Some notes:

Step 1 can be approached in cases. First show that the proposition holds for the numbers 0–9. Proceed next to consider numbers 10–19. Next, 20–29. Next, 30–99. Then (using the foregoing results) 100–999. From that point, the extension to higher numbers is fairly easy, since the numbering system for long numbers proceeds by (1) naming the three-digit chunks as if they were amounts of hundreds, and (2) replacing commas with "period words" (..., BILLION, MILLION, THOUSAND—none of which will affect the w count).

(The only wrinkle here arises when the last three digits of the number are all 0. In a case like this, we don't say "ONE MILLION ZERO," for example. But since the absence or presence of ZERO doesn't affect the number of w's, this feature of the naming system doesn't affect the conclusion.)

Step 5 can be proved in lots of ways. For example, picture an old-fashioned car odometer that starts at 000000, goes all the way up to 999999, and then rolls over to 000000. All in all, the leftmost wheel turns once, the next wheel turns ten times, and so on down to the rightmost wheel, which turns a hundred thousand times. The point is, each wheel turns an integral number of times. On any one of these turns, on any one of these wheels, 2 faces outward once and 6 faces outward once; hence, 2 and 6 face outward the same number of times altogether.