login
A370404
Lexicographically earliest sequence of distinct nonnegative terms such that the last digit of a(n) is present in a(n+1), the last letter of the English name of a(n) is present in the English name of a(n+1) and the last letter of the French name of a(n) is present in the French name of a(n+1).
6
0, 103, 3, 23, 33, 37, 7, 17, 27, 47, 57, 67, 70, 60, 30, 40, 50, 80, 160, 90, 170, 190, 220, 20, 120, 130, 140, 150, 180, 260, 230, 240, 250, 270, 280, 320, 290, 360, 330, 340, 350, 370, 390, 460, 380, 470, 490, 560, 420, 430, 440, 450, 480, 570, 590, 620, 520, 530, 540, 550, 580, 630, 640, 650, 660, 670, 680, 690, 760, 720, 730, 740, 750, 770, 790, 860, 780, 870, 890, 960, 820, 830, 840, 850, 880, 970, 990, 1022, 2, 22, 32
OFFSET
1,2
LINKS
Eric Angelini, Talking to me?, personal blog, Feb 2024.
EXAMPLE
0 zero=zéro, 103 one hundred three=cent trois, 3 three=trois, 23 twenty-three=vingt-trois, 33 thirty-three=trente-trois, 37 thirty-seven=trente-sept, 7 seven=sept, 17 seventeen=dix-sept, 27 twenty-seven=vingt-sept, 47 forty-seven=quarante-sept, 57 fifty-seven=cinquante-sept, 67 sixty-seven=soixante-sept, 70 seventy=soixante-dix, 60 sixty=soixante, etc.
MATHEMATICA
a[1]=0; a[n_]:=a[n]=(k=1; While[MemberQ[Array[a, n-1], k]||FreeQ[IntegerDigits@k, Mod[a[n-1], 10]]||!StringContainsQ[IntegerName[k, "Words"], Last@Characters@IntegerName[a[n-1], "Words"]]||!StringContainsQ[IntegerName[k, "French"], Last@Characters@IntegerName[a[n-1], "French"]], k++]; k); Array[a, 91]
PROG
(Python)
from num2words import num2words
from itertools import count, islice
def en(n): return num2words(n).replace(" and", "")
def fr(n): return num2words(n, lang='fr')
def agen(): # generator of terms
an, aset, mink = 0, set(), 1
while True:
yield an
aset.add(an)
t1, t2, t3, k = str(an%10), en(an)[-1], fr(an)[-1], mink
an = next(k for k in count(mink) if k not in aset and t1 in str(k) and t2 in en(k) and t3 in fr(k))
while mink in aset: mink += 1
print(list(islice(agen(), 91))) # Michael S. Branicky, Feb 18 2024
CROSSREFS
KEYWORD
base,nonn,word
AUTHOR
STATUS
approved