Sunday, November 10, 2013

Define, divide, and conquer

I had done a table of smallest positive integer whose name has a given number (3-758) of letters and was anxious to tackle the largest-number analogue. The initial terms had a modicum of fame by being part of the Google Labs Aptitude Test (second-last item). I checked the sequence in the OEIS where it sported nine terms (3-11 letters) and the opinion that "beyond this point the terms are too ill-defined to include". So the first thing I did was provide a more tractable outcome for the sequence, accomplished simply enough by adding "less than 10^66" to the sequence definition.

I realize that a largest-number sequence limited in scope by a hard cut-off like this is somehow less natural (if words in any language could ever be considered natural) but it does no harm to the initial terms and provides a firm framework for many more. I derived the terms for 12-42 letters manually, more or less by inspection. I contributed the terms thus far as a b-file and noted the final (758 letters) number which I had previously encountered as a contribution from Eric Brahinsky on Jeff Miller's Word Oddities site, though since removed. Finally, I added the keyword "hard" because I did not see my way to solving for a lot more terms. Well, I hadn't at that point tried.

Once I did set about expanding the b-file, things just fell into place: terms for 631-701 letters were derived by brute force on my computer. Manually, I derived the terms for 757-702 letters (backwards). Then I had my computer calculate sections of 28 terms each surrounding (10^3n-1)*10^(66-3n) for an appropriate range of n. This gave me terms for 50-77, 84-111, 120-147, 153-180, 187-214, 225-252, 258-285, 291-318, 323-350, 353-380, 383-410, 413-440, 444-471, 475-502, 507-534, 539-566, and 568-630 letters.

These sections provided the anchors for what remained. Considering endings of 10*10^9 provided the terms for 43, 78, 112, 148, 181, 215, 253, 286, 319, 351, 381, 411, 441, 472, 503, 535, and 567 letters; endings of 10*10^12: 44, 79, 113, 149, 182, 216, 254, 287, 320, 352, 382, 412, 442, 473, 504, and 536 letters; endings of 10*10^33: 45, 80, 114, 150, 183, 217, 255, 288, and 321 letters; endings of 10*10^24: 46, 81, 115, 151, 184, 218, 256, 289, and 322 letters; endings of 10*10^36: 47, 82, 116, 152, 185, 219, 257, and 290 letters.

The remainder were done piecemeal, in this order: 48, 83, 117, 186, and 220 letters; 49, 118, and 221 letters; 119 and 222 letters; 223 letters; 224 letters; 443, 474, 505, and 537 letters; and finally, 506 and 538 letters.

After all that, I removed the keyword "hard" from this OEIS sequence. My table is here.