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!)
A159451 Number of numbers less than n, that are contained in n written as English number names. 3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 3, 3, 3, 3, 2, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 2, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 2, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 2, 3, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,22
COMMENTS
a(A159452(n)) = 0;
a(A159453(n)) = n and a(m) <> n for m < A159453(n).
LINKS
EXAMPLE
n = 19 -> nineteen: a(19) = #{nine} = 1;
n = 20 -> twenty: a(20) = #{} = 0;
n = 21 -> twentyone: a(21) = #{one, twenty} = 2.
PROG
(Python)
from num2words import num2words
from functools import cache
@cache
def n2w(n):
map = {ord(c): None for c in "-, "}
return num2words(n).replace(" and", "").translate(map)
def a(n): wn = n2w(n); return sum(1 for i in range(n) if n2w(i) in wn)
print([a(n) for n in range(105)]) # Michael S. Branicky, Feb 13 2024
CROSSREFS
Sequence in context: A055178 A174847 A215887 * A336682 A103159 A063056
KEYWORD
nonn,word
AUTHOR
Reinhard Zumkeller, Apr 12 2009
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 April 23 10:26 EDT 2024. Contains 371905 sequences. (Running on oeis4.)