login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A370402 Lexicographically earliest sequence of distinct nonnegative terms such that the last digit of a(n) is present in a(n+1) and the last letter of the English name of a(n) is present in the English name of a(n+1). 6
0, 40, 20, 30, 50, 60, 70, 80, 90, 120, 130, 140, 150, 160, 170, 180, 190, 220, 230, 240, 250, 260, 270, 280, 290, 320, 330, 340, 350, 360, 370, 380, 390, 420, 430, 440, 450, 460, 470, 480, 490, 520, 530, 540, 550, 560, 570, 580, 590, 620, 630, 640, 650, 660, 670, 680, 690, 720, 730, 740, 750, 760, 770, 780 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
When will the first integer not ending in zero appear?
Answer: a(83) = 1021. - Michael S. Branicky, Feb 18 2024
LINKS
Eric Angelini, Talking to me?, personal blog, Feb 2024.
EXAMPLE
0 zero, 40 forty, 20 twenty, 30 thirty, 50 fifty, 60 sixty, 70 seventy, 80 eighty, 90 ninety, 120 one hundred twenty, 130 one hundred thirty, 140 one hundred forty, 150 one hundred fifty, 160 one hundred sixty, 170 one hundred seventy, 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"]], k++]; k); Array[a, 64]
PROG
(Python)
from num2words import num2words
from itertools import count, islice
def name(n): return num2words(n).replace(" and", "")
def agen(): # generator of terms
an, aset, mink = 0, set(), 1
while True:
yield an
aset.add(an)
t1, t2, k = str(an%10), name(an)[-1], mink
an = next(k for k in count(mink) if k not in aset and t1 in str(k) and t2 in name(k))
while mink in aset: mink += 1
print(list(islice(agen(), 64))) # Michael S. Branicky, Feb 18 2024
CROSSREFS
Sequence in context: A365051 A033975 A033360 * A029543 A097208 A216137
KEYWORD
base,nonn,word
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 9 06:59 EDT 2024. Contains 375762 sequences. (Running on oeis4.)