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.

A006944 Number of letters in the n-th ordinal number (in American English).

Original entry on oeis.org

5, 6, 5, 6, 5, 5, 7, 6, 5, 5, 8, 7, 10, 10, 9, 9, 11, 10, 10, 9, 11, 12, 11, 12, 11, 11, 13, 12, 11, 9, 11, 12, 11, 12, 11, 11, 13, 12, 11, 8, 10, 11, 10, 11, 10, 10, 12, 11, 10, 8, 10, 11, 10, 11, 10, 10, 12, 11, 10, 8, 10, 11, 10, 11, 10, 10, 12, 11, 10, 10, 12, 13, 12, 13, 12, 12
Offset: 1

Views

Author

Keywords

Comments

a(0) is ambiguous (see Wikipedia: English numerals link). It is either 6 or 7 depending on whether the word used is 'zeroth' or 'noughth'. - Jon Perry, Nov 01 2014
The ordinal numbers 101st, 102nd, etc., are commonly spoken as "one hundred and first," "one hundred and second," etc., with the word "and" following the word "hundred." The more concise wordings "one hundred first," "one hundred second," etc. (without the word "and") are recommended by numerous authoritative reference works on American English, including the AP Style Guide and the U.S. Government Printing Office Style Manual. The American convention of omitting the "and" is followed in the b-file. - Jon E. Schoenfield, Nov 04 2014

Examples

			"First" has 5 letters, so a(1)=5.
Hyphens and spaces are not counted, so, e.g., a(21)=11 ("twenty-first") and a(100)=12 ("one hundredth").
		

References

  • Netnews group rec.puzzles, Frequently Asked Questions (FAQ) file (Science Section).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005589.
Cf. A196278 (analog for French), A006969 (variant for French counting spaces and hyphens).

Programs

  • Python
    from num2words import num2words
    def a(n): return sum(1 for c in num2words(n, to='ordinal').replace(" and", "") if c.isalpha())
    print([a(n) for n in range(1, 77)]) # Michael S. Branicky, Aug 08 2021 edited Jul 12 2022

Extensions

More terms from Jon E. Schoenfield, Aug 13 2007