cp's OEIS Frontend

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.

A000052 1-digit numbers arranged in alphabetical order, then the 2-digit numbers arranged in alphabetical order, then the 3-digit numbers, etc.

This page as a plain text file.
%I A000052 #44 Aug 05 2021 10:38:09
%S A000052 8,5,4,9,1,7,6,3,2,0,18,80,88,85,84,89,81,87,86,83,82,11,15,50,58,55,
%T A000052 54,59,51,57,56,53,52,40,48,45,44,49,41,47,46,43,42,14,19,90,98,95,94,
%U A000052 99,91,97,96,93,92,17,70,78,75,74,79,71,77,76,73,72
%N A000052 1-digit numbers arranged in alphabetical order, then the 2-digit numbers arranged in alphabetical order, then the 3-digit numbers, etc.
%C A000052 This sequence uses standard US English names for numbers. - _Daniel Forgues_, May 11 2016
%C A000052 For example, standard US English writes out the number 101 as "one hundred one", whereas standard UK English writes it out as "one hundred and one" (see Links). - _Jon E. Schoenfield_, Dec 25 2016
%C A000052 Alphabetical order is with spaces removed/disregarded, else, as a first example, a(1003)=8018 ("eight thousand eighteen") would follow a(1004)=8800 ("eight thousand eight hundred") among others. - _Michael S. Branicky_, Aug 05 2021
%H A000052 <a href="/A000052/b000052.txt">Table of n, a(n) for n = 1..10000</a>
%H A000052 Wikipedia, <a href="https://en.wikipedia.org/wiki/101st_United_States_Congress">101st United States Congress</a>
%H A000052 Wiktionary, <a href="https://en.wiktionary.org/wiki/one_hundred_one">one hundred one</a> (US)
%H A000052 Wiktionary, <a href="https://en.wiktionary.org/wiki/one_hundred_and_one">one hundred and one</a> (UK)
%e A000052 eight, five, four, nine, one, seven, six, three, two, zero, eighteen, etc.
%e A000052 Examples of spelling convention used for values above 99:
%e A000052 400: "four hundred"
%e A000052 726: "seven hundred twenty-six"
%e A000052 1992: "one thousand nine hundred ninety-two"
%e A000052 2202: "two thousand two hundred two"
%e A000052 101001: "one hundred one thousand one"
%e A000052 726726: "seven hundred twenty-six thousand seven hundred twenty-six"
%e A000052 101000001: "one hundred one million one"
%p A000052 V:= [[$0..9],[$10..99],[$100..999]]:
%p A000052 seq(op(V[i][sort(map(convert,V[i],english,'And'),
%p A000052 output=permutation)]),i=1..3); # _Robert Israel_, Jun 17 2016
%t A000052 Flatten@Join[{8, 5, 4, 9, 1, 7, 6, 3, 2, 0}, SortBy[Range[10^#, 10^(# + 1) - 1], StringReplace[IntegerName[#, "Words"], "," -> ""] &] & /@ Range[3]] (* _Davin Park_, Dec 25 2016 *)
%o A000052 (Python)
%o A000052 from num2words import num2words
%o A000052 def n2w(n):
%o A000052   return num2words(n).replace(" and", "").replace(",", "").replace(" ", "")
%o A000052 def agen(maxdigits):
%o A000052   for d in range(1, maxdigits+1):
%o A000052     yield from sorted(range(10**(d-1)-(d==1), 10**d), key=lambda x: n2w(x))
%o A000052 print([an for an in agen(2)]) # _Michael S. Branicky_, Aug 05 2021
%Y A000052 Cf. A001058.
%K A000052 nonn,base,word
%O A000052 1,1
%A A000052 _N. J. A. Sloane_
%E A000052 Corrected by _Davin Park_, Dec 25 2016