Displaying 1-10 of 12 results found.
a(n) is the smallest nonnegative number whose American English name has the letter "n" in the n-th position.
+0
9
9, 1, 9, 20, 7, 11, 15, 13, 17, 47, 27, 77, 109, 120, 107, 111, 115, 113, 117, 147, 127, 177, 327, 377, 1120, 1107, 1111, 1115, 1113, 1117, 1147, 1127, 1177, 1327, 1377, 3327, 3377, 11377, 13327, 13377, 17377, 23327, 23377, 73377, 101377, 103327, 103377
REFERENCES
GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 70.
EXAMPLE
a(1)=9 ("Nine"), a(2)=1 ("oNe"), a(3)=9 ("niNe"), a(4)=20 ("tweNty").
PROG
(Python)
from num2words import num2words
from itertools import count, islice
def n2w(n):
return "".join(c for c in num2words(n).replace(" and", "") if c.isalpha())
def a(n):
return next(i for i in count(0) if len(w:=n2w(i))>=n and w[n-1]=="n")
(Python) # faster for initial segment of sequence; uses n2w, imports above
def agen(): # generator of terms
adict, n = dict(), 1
for i in count(0):
w = n2w(i)
if "n" in w:
locs = [i+1 for i, c in enumerate(w) if w[i] == "n"]
for v in locs:
if v not in adict: adict[v] = i
while n in adict: yield adict[n]; n += 1
EXTENSIONS
Definition clarified by N. J. A. Sloane, Apr 20 2023. We also need a British English analog of this, just as A362121 is an analog of A164790 (a(13) will be different).
a(n) is the smallest number which has in its English name the letter "o" in the n-th position, or -1 if no such number exists.
+0
8
1, 4, 2, 0, 4000000000000000000000000000, 41, 21, 24, 22, 72, 101, 104, 102, 304, 302, 141, 121, 124, 122, 172, 322, 372, 1104, 1102, 1304, 1302, 1141, 1121, 1124, 1122, 1172, 1322, 1372, 3322, 3372, 11372, 13322, 13372, 17372, 23322, 23372, 73372, 101372, 103322, 103372
EXAMPLE
a(1)=1 ("One"), a(2)=4 ("fOur"), a(3)=2 ("twO"), a(4)=0 ("zerO"), a(5)=4*10^27 ("fourOctillion").
a(n) is the smallest number whose English name has the letter "t" in the n-th position, or -1 if no such number exists.
+0
8
2, -1, -1, 15, 8, 17, 22, 72, 13000, 48, 28, 78, 302, 115, 108, 117, 122, 172, 322, 148, 128, 178, 328, 378, 1115, 1108, 1117, 1122, 1172, 1322, 1148, 1128, 1178, 1328, 1378, 3328, 3378, 11378, 13328, 13378, 17378, 23328, 23378, 73378, 101378, 103328, 103378
EXAMPLE
a(1)=2 ("Two"), a(4)=15 ("fifTeen"), a(9)=13000 ("thirteenThousand"), a(13)=302 ("threehundredTwo").
a(n) is the smallest number whose English name has the letter "i" in the n-th position, or -1 if no such number exists.
+0
8
-1, 5, 13, -1, 1000000, 4000000, 45, 25, 75, 13000000, 17000000, 105, 113, 305, 313, 3013, 145, 125, 175, 325, 375, 3075, 1105, 1113, 1305, 1313, 3305, 1145, 1125, 1175, 1325, 1375, 3325, 3375, 11375, 13325, 13375, 17375, 23325, 23375, 73375, 101375, 103325
COMMENTS
Original definition used "-2 for infinite".
EXAMPLE
a(2)=5 ("fIve"), a(3)=13 ("thIrteen"), a(5)=10^6 ("onemIllion").
EXTENSIONS
Name changed to remove "-2" (see Comments), and a(1) and a(4) changed from -2 to -1 by Jon E. Schoenfield, Feb 02 2021
a(n) is the smallest number whose English name has the letter "f" in the n-th position, or -1 if no such number exists.
+0
8
4, -1, 15, -1, -1, 44, 24, 74, -1, -1, 104, 404, 115, 415, 315, 144, 124, 174, 324, 374, 3074, 1104, 1404, 1115, 1415, 1315, 1144, 1124, 1174, 1324, 1374, 3324, 3374, 11374, 13324, 13374, 17374, 23324, 23374, 73374, 101374, 103324, 103374, 111374, 113324
EXAMPLE
a(1)=4 ("Four"), a(3)=15 ("fiFteen"), a(11)=104 ("onehundredFour").
a(n) is the smallest number whose English name has the letter "h" in the n-th position, or -1 if no such number exists.
+0
8
-1, 3, -1, 8, 400, 300, 43, 23, 48, 28, 78, 103, 403, 108, 408, 308, 143, 123, 148, 128, 178, 328, 378, 1403, 1108, 1408, 1308, 1143, 1123, 1148, 1128, 1178, 1328, 1378, 3328, 3378, 11378, 13328, 13378, 17378, 23328, 23378, 73378, 101378, 103328, 103378
EXAMPLE
a(2)=3 ("tHree"), a(4)=8 ("eigHt"), a(12)=103 ("onehundredtHree").
a(n) is the smallest number whose English name has the letter "r" in the n-th position, or -1 if no such number exists.
+0
8
-1, -1, 0, 4, 1000000000000, 4000000000000, 3000000000000, 43, 23, 24, 74, 24000000000000, 103, 104, 303, 304, 3004, 143, 123, 124, 174, 324, 374, 1103, 1104, 1303, 1304, 3303, 1143, 1123, 1124, 1174, 1324, 1374, 3324, 3374, 11374, 13324, 13374, 17374, 23324
EXAMPLE
a(3)=0 ("zeRo"), a(4)=4 ("fouR"), a(5)=1000000000000 ("onetRillion"), a(13)=103 ("onehundredthRee").
a(n) is the smallest number whose English name has the letter "u" in the n-th position, or -1 if no such number exists.
+0
8
-1, -1, 4, 1000000000000000000000000000000000000, 100, 400, 300, 44, 24, 74, 15000, 13000, 104, 404, 304, 4004, 1100, 144, 124, 174, 324, 374, 3024, 3074, 1104, 1404, 3404, 3304, 1144, 1124, 1174, 1324, 1374, 3324, 3374, 11374, 13324, 13374, 17374, 23324, 23374
EXAMPLE
a(3)=4 ("foUr"), a(5)=100 ("onehUndred"), a(4)=10^36 ("oneUndecillion").
a(n) is the smallest positive number whose American English name has the letter "e" in the n-th position.
+0
4
8, 7, 1, 3, 3, 12, 13, 17, 21, 23, 23, 73, 101, 103, 103, 112, 113, 117, 121, 123, 123, 173, 323, 373, 1103, 1103, 1112, 1113, 1117, 1121, 1123, 1123, 1173, 1323, 1373, 3323, 3373, 11373, 13323, 13373, 17373, 23323, 23373, 73373, 101373, 103323, 103373, 111373
REFERENCES
GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 70.
PROG
(Python)
from itertools import count
from num2words import num2words
def A362120(n): return next(filter(lambda k:len(s:=num2words(k).replace('-', '').replace(', ', '').replace(' and ', '').replace(' ', ''))>=n and s[n-1]=='e', count(1))) # Chai Wah Wu, Apr 21 2023
a(n) is the smallest nonnegative number whose British English name has the letter "e" in the n-th position.
+0
4
8, 0, 1, 3, 3, 12, 13, 17, 21, 23, 23, 73, 1700, 108, 107, 101, 103, 103, 112, 113, 117, 121, 123, 123, 173, 323, 373, 1103, 1103, 1112, 1113, 1117, 1121, 1123, 1123, 1173, 1323, 1373, 3323, 3373, 11373, 13323, 13373, 17373, 23323, 23373, 73373, 101123, 101173
REFERENCES
GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 70.
PROG
(Python)
from num2words import num2words
from itertools import count, islice
def n2w(n):
return "".join(c for c in num2words(n, lang='en_GB') if c.isalpha())
def A362121(n, t="e", i0=0): # t is target letter, i0 is start
return next(i for i in count(i0) if len(w:=n2w(i))>=n and w[n-1]==t)
(Python) # faster for initial segment of sequence; uses n2w, imports above
def A362121gen(t="e", i0=0, offset=1): # generator of terms w
adict, n = dict(), offset
for i in count(i0):
w = n2w(i)
if t in w:
locs = [i+1 for i, c in enumerate(w) if w[i] == t]
for v in locs:
if v not in adict: adict[v] = i
while n in adict: yield adict[n]; n += 1
Search completed in 0.005 seconds
|