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!)
A124060 T totaler sequence. Number of t's in the American spelling of numbers. 1
0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,14
LINKS
EXAMPLE
The words "zero" and "one" have no t's, so a(0) = a(1) = 0.
The words "two" and "three" each have one t, so a(2) = a(3) = 1.
PROG
(PARI) total(n) = { local(a, i, j, sumt); a=["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eghteen", "nineteen", "twenty", "twentyone", "twentytwo", "twentythree", "twentyfour", "twentyfive", "twentysix", "twentyseven", "twentyeight", "twentynine", "thirty", "thirtyone", "thirtytwo", "thirtythree", "thirtyfour", "thirtyfive", "thirtysix", "thirtyseven", "thirtyeight", "thirtynine", "forty", "fortyone", "fortytwo", "fortythree", "fortyfour", "fortyfive", "fortysix", "fortyseven", "fortyeight", "fortynine", "fifty"]; for(i = 1, n, sumt=0; for(j=1, length(a[i]), if(mid(a[i], j, 1)=="t", sumt++) ); print1(sumt, ", ") ) }
\\ Get a substring of length n from string str starting at position s in str.
mid(str, s, n) = { local(v, ln, x, tmp); v =""; tmp = Vec(str); ln=length(tmp); for(x=s, s+n-1, v=concat(v, tmp[x]); ); return(v) }
(Python)
from num2words import num2words
def a(n): return num2words(n).count('t')
print([a(n) for n in range(87)]) # Michael S. Branicky, Nov 25 2021
CROSSREFS
Sequence in context: A053632 A242217 A306734 * A329720 A140194 A353282
KEYWORD
nonn,word
AUTHOR
Cino Hilliard, Nov 03 2006
EXTENSIONS
Offset corrected by Jon E. Schoenfield, Nov 23 2021
a(51) and beyond from Michael S. Branicky, Nov 25 2021
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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)