%I #46 Jul 24 2022 02:30:45
%S 1,2,200,201,202,2000,2001,2002,2200,2201,2202,2000000000000,
%T 2000000000001,2000000000002,2000000000200,2000000000201,
%U 2000000000202,2000000002000,2000000002001,2000000002002,2000000002200,2000000002201,2000000002202
%N Starting with 1, the next entry is the next higher integer whose spelling in US English comes lexicographically later.
%C For example, "two" is after "one", but "three" is not alphabetically after "two" (and is thus not in the sequence); "two hundred" is after "two"; note that 2201 is spelled "two thousand two hundred one" and not "twenty two hundred and one".
%C The reverse alphabetical sequence starting at 1 consists only of the four terms 1, 4, 5, 8; no integer higher than 8 is alphabetically before "eight".
%C From _Michael S. Branicky_, Sep 16 2021: (Start)
%C The comments regarding "and" above denote that US English is used.
%C Alphabetical order is with commas removed, but with spaces included, e.g., 8800 ("eight thousand eight hundred") would precede 8018 ("eight thousand eighteen").
%C In extending the sequence to large numbers, the "American system" (Weisstein link), also known as the "short scale" (Wikipedia link), was used.
%C a(12) = 2*10^12 ("two trillion"). The next term not displayed is a(24) = 2*10^36 ("two undecillion"). The highest known term is a(95) = 2*10^63 + 2*10^36 + 2*10^12 + 2202 ("two vigintillion two undecillion two trillion two thousand two hundred two"). See b-file and link to US English names of terms. (End)
%C If "and"'s were used, then a(8) = 2002 ("two thousand and two") and a(9..14) would be 2100 ("two thousand one hundred"), 2101, 2102, 2200, 2201, 2202. - _Michael S. Branicky_, Jul 14 2022
%H Michael S. Branicky, <a href="/A180301/b180301.txt">Table of n, a(n) for n = 1..95</a>
%H Michael S. Branicky, <a href="/A180301/a180301_1.txt">US English names of terms</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LargeNumber.html">Large Number</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Names_of_large_numbers">Names of Large Numbers</a>
%H Wiktionary, <a href="https://en.wiktionary.org/wiki/one_hundred_one">one hundred one</a> (US)
%H Wiktionary, <a href="https://en.wiktionary.org/wiki/one_hundred_and_one">one hundred and one</a> (UK)
%F From _Michael S. Branicky_, Sep 16 2021: (Start)
%F a(12+i) = 2*10^12 + a(i), for i in 1..11.
%F a(24+i) = 2*10^36 + a(i), for i in 1..23.
%F a(48+i) = 2*10^63 + a(i), for i in 1..47. (End)
%e 1 ("one") is followed in lexicographic order first by 2 ("two"), and successively by 200 ("two hundred"), 201 ("two hundred one"), and so on.
%o (Python)
%o from num2words import num2words
%o def n2w(n):
%o return num2words(n).replace(" and", "").replace(chr(44), "")
%o def afind(limit, start=1):
%o last, t = start, start+1
%o print(start, end=", ")
%o while t <= limit:
%o target = n2w(last)
%o while n2w(t) <= target:
%o t += 1
%o if t > limit: return
%o last = t
%o print(t, end=", ")
%o afind(3000) # _Michael S. Branicky_, Sep 16 2021
%K easy,fini,nonn,word
%O 1,2
%A Dan Heisman (danheisman(AT)comcast.net), Aug 24 2010