login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A159453
Smallest numbers containing exactly n smaller numbers when written as English number names.
2
0, 14, 21, 61, 414, 114, 122, 161, 162, 4414, 1114, 1122, 1223, 1161, 1162, 1263, 14162, 21114, 21132, 21233, 26666, 21161, 21162, 21263, 61273, 114261, 114263, 121233, 122334, 121161, 121162, 121261, 121263, 122364, 161273, 162374, 1114261, 1114263, 1122334
OFFSET
0,2
COMMENTS
A159451(a(n)) = n and A159451(m) <> n for m < a(n).
EXAMPLE
a(0)=0->zero: A159451(0)=#{}=0;
a(1)=14->fourteen: A159451(14)=#{4}=1;
a(2)=21->twentyone: A159451(21)=#{1,20}=2;
a(3)=61->sixtyone: A159451(61)=#{1,6,60}=3;
a(4)=414->fourhundredfourteen: A159451(414)=#{4,14,400,404}=4;
a(5)=114->onehundredfourteen: A159451(114)=#{1,4,14,100,104}=5;
a(6)=122->onehundredtwentytwo: A159451(122)=#{1,2,20,22,100,120}=6;
a(7)=161->onehundredsixtyone: A159451(161)=#{1,6,60,61,100,106,160}=7;
a(8)=162->onehundredsixtytwo: A159451(162)=#{1,2,6,60,62,100,106,160}=8;
a(9)=4414->fourthousandfourhundredfourteen: A159451(4414)=#{4,14,400,404,414,4000,4004,4400,4404}=9;
a(10)=1114->onethousandonehundredfourteen: A159451(1114)=#{1,4,14,100,104,114,1000,1001,1100,1104}=10;
a(11)=1122->onethousandonehundredtwentytwo: A159451(1122)=#{1,2,20,22,100,120,122,1000,1001,1100,1120}=11;
a(12)=1223->onethousandtwohundredtwentythree: A159451(1223)=#{1,2,3,20,23,200,220,223,1000,1002,1200,1220}=12;
a(13)=1161->onethousandonehundredsixtyone: A159451(1161)=#{1,6,60,61,100,106,160,161,1000,1001,1100,1106,1160}=13;
a(14)=1162->onethousandonehundredsixtytwo: A159451(1162)=#{1,2,6,60,62,100,106,160,162,1000,1001,1100,1106,1160}=14;
a(15)=1263->onethousandtwohundredsixtythree: A159451(1263)=#{1,2,3,6,60,63,200,206,260,263,1000,1002,1200,1206,1260}=15.
PROG
(Python) # see Links for a faster version
from num2words import num2words
from itertools import count, islice
def n2w(n):
map = {ord(c): None for c in "-, "}
return num2words(n).replace(" and", "").translate(map)
def agen(): # generator of terms
W, adict, n = set(), dict(), 0
for m in count(0):
w = n2w(m)
v = len(set(w[i:j] for i in range(len(w)) for j in range(i+1, len(w)+1) if w[i:j] in W))
if v not in adict: adict[v] = m
while n in adict: yield adict[n]; n += 1
W.add(w)
print(list(islice(agen(), 24))) # Michael S. Branicky, Feb 13 2024
CROSSREFS
KEYWORD
nonn,word
AUTHOR
Reinhard Zumkeller, Apr 12 2009
EXTENSIONS
a(16) and beyond from Michael S. Branicky, Feb 13 2024
STATUS
approved