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.

A085513 Number of "e"s in n (in English).

Original entry on oeis.org

1, 1, 0, 2, 0, 1, 0, 2, 1, 1, 1, 3, 2, 2, 2, 2, 2, 4, 3, 3, 1, 2, 1, 3, 1, 2, 1, 3, 2, 2, 0, 1, 0, 2, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 0, 1, 0, 2, 1, 1, 2, 3, 2, 4, 2, 3, 2, 4, 3, 3, 1, 2, 1, 3, 1, 2, 1, 3, 2, 2, 1, 2, 1, 3, 1, 2, 1, 3, 2, 2
Offset: 0

Views

Author

Samuel Thompson (samuelt(AT)ugcs.caltech.edu), Jul 03 2003

Keywords

Comments

a(A006933(n)) = 0; a(A008520(n)) > 0. - Reinhard Zumkeller, Jan 23 2015
a(A006933(n)) = 0; a(A008520(n)) > 0; a(A121065(n)) = n and a(m) != n for m < A121065(n). - Reinhard Zumkeller, Jan 24 2015

Examples

			a(123) = 5 because "onE hundrEd twEnty-thrEE" has 5 e's.
		

Crossrefs

Programs

  • Haskell
    import Data.Maybe (fromJust)
    import Data.Text (Text); import qualified Data.Text as T (unpack))
    import Text.Numeral.Grammar.Reified (defaultInflection)
    import qualified Text.Numeral.Language.EN as EN  -- see link
    a085513 = length . filter (== 'e') . T.unpack . numeral where
       numeral :: Integer -> Text
       numeral = fromJust . EN.gb_cardinal defaultInflection
    -- Reinhard Zumkeller, Jan 23 2015
    
  • Mathematica
    StringCount[IntegerName/@Range[0,99],"e"] (* Ivan N. Ianakiev, Mar 25 2017 *)
  • Python
    from num2words import num2words
    def A085513(n):
        return num2words(n).count('e') # Chai Wah Wu, Dec 20 2019