This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A356024 #6 Jul 24 2022 13:04:43 %S A356024 2,200,12,6,6,10,10,9,10,12,12,20,20,16,16,20,20,19,20,21,22,200,200, %T A356024 26,26,200,200,29,200,31,32,200,200,36,36,200,200,39,200,41,42,60,60, %U A356024 46,46,60,60,49,60,51,52,60,60,56,56,60,60,59,60,61,62,200,200 %N A356024 a(n) is the next higher integer than n whose spelling in US English comes lexicographically later. %C A356024 Alphabetical order is with commas removed, but with spaces included, e.g., 8800 ("eight thousand eight hundred") would precede 8018 ("eight thousand eighteen"). %C A356024 In extending the sequence to large numbers, the "American system" (Weisstein link), also known as the "short scale" (Wikipedia link), is used. %H A356024 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LargeNumber.html">Large Number</a> %H A356024 Wikipedia, <a href="https://en.wikipedia.org/wiki/Names_of_large_numbers">Names of Large Numbers</a> %H A356024 Wiktionary, <a href="https://en.wiktionary.org/wiki/one_hundred_one">one hundred one</a> (US) %H A356024 Wiktionary, <a href="https://en.wiktionary.org/wiki/one_hundred_and_one">one hundred and one</a> (UK) %F A356024 a(A180301(n)) = A180301(n+1). %e A356024 a(1) = 2 since "two" is after "one". %e A356024 a(2) = 200 since "two hundred" is after "two". %e A356024 a(2202) = 2000000000000 since "two trillion" is after "two thousand two hundred two". %o A356024 (Python) %o A356024 from num2words import num2words %o A356024 def n2w(n): return num2words(n).replace(" and", "").replace(chr(44), "") %o A356024 def a(n): %o A356024 target, t = n2w(n), n+1 %o A356024 while n2w(t) <= target: t += 1 %o A356024 return t %o A356024 print([a(n) for n in range(1, 64)]) # _Michael S. Branicky_, Jul 23 2022 %Y A356024 Cf. A180301. %K A356024 nonn,word %O A356024 1,1 %A A356024 _Michael S. Branicky_, Jul 23 2022