In the Math Corner of my September Diary I included the following brainteaser.
Brainteaser. Here's a cute one from Dr. Peter Winkler at the National Museum of Mathematics. This one was posted to subscribers of the weekly "Mind-Benders for the Quarantined" on September 12th.
What is the first odd number in the dictionary?
More specifically, suppose that every whole number from 1 to, say, 1010 is written out in formal English (e.g., "two hundred eleven," "one thousand, one hundred forty-two") and then listed in dictionary order, that is, alphabetical order with spaces and punctuation ignored. What's the first odd number in the list?
[Copied straight from Dr. Winkler.]
In dictionary order, one word precedes another precisely when the first letter in which the two words differ is, in the first word, earlier in the alphabet. Spaces and punctuation are ignored, and if there is no differing letter, the shorter word appears first.
So, finding the dictionary-first word in a set of words is just a matter of carefully and systematically considering the successive words involved in the description of a number.
The earliest digit is "eight," and the earliest odd digit is "five." We don't need to consider any other digits, but other possibly useful words that appear in numbers include "billion," "eighteen," "eighty," "hundred," "million," and "thousand." Our earliest odd number must begin with a digit, so it should start with "eight billion." After that, "eighteen" is the best we can do, and proceeding along these lines, we eventually get the answer 8,018,018,885: "eight billion, eighteen million, eighteen thousand, eight hundred eighty-five."
A little more work will get you to the first prime number in the dictionary, 8,018,018,851.
Annoyingly, "dictionary order" is (according to Wikipedia) subtly different from "alphabetical order," and the difference makes a difference. The issue is that, in alphabetical order, which is used with people's names, spaces typically are not ignored, but instead precede all other characters. Thus, alphabetically, "eight hundred" precedes "eighteen," and the first odd number in alphabetical order becomes 8,808,808,885. The first prime would in that case be the very next odd number in alphabetical order, namely, 8,808,808,889.
[I've heard the prime version of this gem attributed to Donald Knuth — and it indeed sounds like Don's creative mind at work!]