(Translated by https://www.hiragana.jp/)
A000052 - OEIS
login
A000052
1-digit numbers arranged in alphabetical order, then the 2-digit numbers arranged in alphabetical order, then the 3-digit numbers, etc.
24
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, 54, 59, 51, 57, 56, 53, 52, 40, 48, 45, 44, 49, 41, 47, 46, 43, 42, 14, 19, 90, 98, 95, 94, 99, 91, 97, 96, 93, 92, 17, 70, 78, 75, 74, 79, 71, 77, 76, 73, 72
OFFSET
1,1
COMMENTS
This sequence uses standard US English names for numbers. - Daniel Forgues, May 11 2016
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
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
EXAMPLE
eight, five, four, nine, one, seven, six, three, two, zero, eighteen, etc.
Examples of spelling convention used for values above 99:
400: "four hundred"
726: "seven hundred twenty-six"
1992: "one thousand nine hundred ninety-two"
2202: "two thousand two hundred two"
101001: "one hundred one thousand one"
726726: "seven hundred twenty-six thousand seven hundred twenty-six"
101000001: "one hundred one million one"
MAPLE
V:= [[$0..9], [$10..99], [$100..999]]:
seq(op(V[i][sort(map(convert, V[i], english, 'And'),
output=permutation)]), i=1..3); # Robert Israel, Jun 17 2016
MATHEMATICA
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 *)
PROG
(Python)
from num2words import num2words
def n2w(n):
return num2words(n).replace(" and", "").replace(", ", "").replace(" ", "")
def agen(maxdigits):
for d in range(1, maxdigits+1):
yield from sorted(range(10**(d-1)-(d==1), 10**d), key=lambda x: n2w(x))
print([an for an in agen(2)]) # Michael S. Branicky, Aug 05 2021
CROSSREFS
Cf. A001058.
Sequence in context: A235995 A254270 A328723 * A072991 A157414 A021543
KEYWORD
nonn,base,word
EXTENSIONS
Corrected by Davin Park, Dec 25 2016
STATUS
approved