OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
Eric Angelini, Talking to me?, personal blog, Feb 2024.
EXAMPLE
1 one=un, 14 fourteen=quatorze, 15 fifteen=quinze, 41 forty-one=quarante et un, 4 four=quatre, 24 twenty-four=vingt-quatre, 20 twenty=vingt, 21 twenty-one=vingt et un, 22 twenty-two=vingt-deux, etc.
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(k=1; While[MemberQ[Array[a, n-1], k]||FreeQ[IntegerDigits@k, First@IntegerDigits@a[n-1]]||!StringContainsQ[IntegerName[k, "Words"], First@Characters@IntegerName[a[n-1], "Words"]]||!StringContainsQ[IntegerName[k, "French"], First@Characters@IntegerName[a[n-1], "French"]], k++]; k); Array[a, 79]
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 = 1, set(), 1
while True:
yield an
aset.add(an)
t1, t2, t3, k = str(an)[0], en(an)[0], fr(an)[0], 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(), 79))) # Michael S. Branicky, Feb 18 2024
CROSSREFS
KEYWORD
base,nonn,word
AUTHOR
Eric Angelini and Giorgos Kalogeropoulos, Feb 17 2024
STATUS
approved