A350217 a(1) = 1; a(n) > a(n-1) is the smallest number whose name in English does not contain the first letter of the name of a(n-1).
1, 3, 4, 6, 8, 30, 100, 300, 400, 600, 800, 2000, 1000000
Offset: 1
Programs
-
Mathematica
name[n_]:=IntegerName[n,"Words"]; a[1]=1; a[n_]:=a[n]=Module[{i=a[n-1]+1}, While[ StringContainsQ[name[i],StringTake[name[a[n-1]],1]], i++ ]; i]; a/@Range[12]
-
Python
from num2words import num2words def n2w(n): return num2words(n).replace(" and", "") def afind(limit): alst, aset = [1], {1} print(1, end=", ") while alst[-1] < limit: an = alst[-1] + 1 avoid = n2w(alst[-1])[0] while an in aset or avoid in n2w(an): an += 1 alst.append(an); aset.add(an) print(an, end=", ") afind(100000) # Michael S. Branicky, Dec 20 2021