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.

A191784 Number of e's in the English name of the n-th odd number.

This page as a plain text file.
%I A191784 #19 Sep 08 2018 21:55:51
%S A191784 1,2,1,2,1,3,2,2,4,3,2,3,2,3,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,
%T A191784 1,3,4,3,4,3,2,3,2,3,2,2,3,2,3,2,3,4,3,4,3,5,4,4,6,5,4,5,4,5,4,3,4,3,
%U A191784 4,3,3,4,3,4,3,3,4,3,4,3,3,4,3,4,3,5,6,5,6,5,4,5,4,5,4,4,5,4,5,4,2,3,2,3,2
%N A191784 Number of e's in the English name of the n-th odd number.
%C A191784 Every odd number has the letter e in its English name, so a(n) can never be 0.
%H A191784 Nathaniel Johnston, <a href="/A191784/b191784.txt">Table of n, a(n) for n = 1..5000</a>
%e A191784 a(5) = 1, because the 5th odd number is "nine", which contains one "e".
%p A191784 units:=[1,0,2,0,1,0,2,1,1,1,3,2,2,2,2,2,4,3,3]:tens:=[0,0,1,0,0,0,0,2,1,1]: A191784 := proc(n) global tens,units: if(n<=10)then return units[2*n-1]: elif(n<=50)then return units[2*((n-1) mod 5) + 1] + tens[floor((n-1)/5)+1]: elif(n<=500)then return 1+units[floor((n-1)/50)]+procname(((n-1) mod 50) + 1): fi: return units[floor((n-1)/500)]+procname(((n-1) mod 500) + 1): end: seq(A191784(n),n=1..105); # valid up to n=5000, _Nathaniel Johnston_, Jun 26 2011
%Y A191784 Cf. A085513.
%K A191784 dumb,easy,nonn,word
%O A191784 1,2
%A A191784 _Kausthub Gudipati_, Jun 25 2011