OFFSET
1,2
MATHEMATICA
name[n_]:=IntegerName[n, "Words"]; a[1]=1;
a[n_]:=a[n]=Module[{i=1}, While[ Or[ MemberQ[Table[a[k], {k, 1, n-1}], i],
StringContainsQ[name[i], StringTake[name[a[n-1]], 1]]], i++ ]; i];
a/@Range[70]
PROG
(Python)
from num2words import num2words
def n2w(n): return num2words(n).replace(" and", "")
def aupton(terms):
alst, aset = [1], {1}
for n in range(2, terms+1):
an = 1
avoid = n2w(alst[-1])[0]
while an in aset or avoid in n2w(an): an += 1
alst.append(an); aset.add(an)
return alst
print(aupton(70)) # Michael S. Branicky, Dec 20 2021
CROSSREFS
KEYWORD
nonn,word
AUTHOR
Ivan N. Ianakiev, Dec 20 2021
STATUS
approved