cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A124060 T totaler sequence. Number of t's in the American spelling of numbers.

This page as a plain text file.
%I A124060 #13 Nov 25 2021 07:32:26
%S A124060 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,
%T A124060 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,
%U A124060 2,1,1,1,2,2,1,1,1,1,2,1,1,1,2,2,1,1,1
%N A124060 T totaler sequence. Number of t's in the American spelling of numbers.
%H A124060 Michael S. Branicky, <a href="/A124060/b124060.txt">Table of n, a(n) for n = 0..10000</a>
%e A124060 The words "zero" and "one" have no t's, so a(0) = a(1) = 0.
%e A124060 The words "two" and "three" each have one t, so a(2) = a(3) = 1.
%o A124060 (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, ", ") ) }
%o A124060 \\ Get a substring of length n from string str starting at position s in str.
%o A124060 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) }
%o A124060 (Python)
%o A124060 from num2words import num2words
%o A124060 def a(n): return num2words(n).count('t')
%o A124060 print([a(n) for n in range(87)]) # _Michael S. Branicky_, Nov 25 2021
%Y A124060 Cf. A005589, A008522.
%K A124060 nonn,word
%O A124060 0,14
%A A124060 _Cino Hilliard_, Nov 03 2006
%E A124060 Offset corrected by _Jon E. Schoenfield_, Nov 23 2021
%E A124060 a(51) and beyond from _Michael S. Branicky_, Nov 25 2021