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 A164790 #30 Apr 22 2023 16:46:35 %S A164790 8,0,1,3,3,12,13,17,21,23,23,73,101,103,103,112,113,117,121,123,123, %T A164790 173,323,373,1103,1103,1112,1113,1117,1121,1123,1123,1173,1323,1373, %U A164790 3323,3373,11373,13323,13373,17373,23323,23373,73373,101373,103323,103373,111373 %N A164790 a(n) is the smallest nonnegative number whose American English name has the letter "e" in the n-th position. %D A164790 GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 70. %e A164790 a(1)=8 ("Eight"), a(2)=0 ("zEro"), a(3)=1 ("onE"), a(4)=3 ("thrEe"). %o A164790 (Python) %o A164790 from num2words import num2words %o A164790 from itertools import count, islice %o A164790 def n2w(n): %o A164790 return "".join(c for c in num2words(n).replace(" and ", "") if c.isalpha()) %o A164790 def A164790(n, t="e", i0=0): # t is target letter, i0 is start %o A164790 return next(i for i in count(i0) if len(w:=n2w(i))>=n and w[n-1]==t) %o A164790 print([A164790(n) for n in range(1, 38)]) # _Michael S. Branicky_, Apr 21 2023 %o A164790 (Python) # faster for initial segment of sequence; uses n2w/imports above %o A164790 def A164790gen(t="e", i0=0, offset=1): # generator of terms w %o A164790 adict, n = dict(), offset %o A164790 for i in count(i0): %o A164790 w = n2w(i) %o A164790 if t in w: %o A164790 locs = [i+1 for i, c in enumerate(w) if w[i] == t] %o A164790 for v in locs: %o A164790 if v not in adict: adict[v] = i %o A164790 while n in adict: yield adict[n]; n += 1 %o A164790 print(list(islice(A164790gen(), 50))) # _Michael S. Branicky_, Apr 21 2023 %Y A164790 See A362120-A362122 for other versions. %Y A164790 Cf. A164789 ("o"), A164791 ("n"), A164792 ("t"), A164793 ("i"), A164794 ("f"), A164795 ("h"), A164796 ("r"), A164797 ("u"). %K A164790 nonn,word %O A164790 1,1 %A A164790 _Claudio Meller_, Aug 26 2009 %E A164790 a(25) and beyond from _Michael S. Branicky_, Mar 25 2021 %E A164790 Name edited by _N. J. A. Sloane_, Apr 20 2023