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.
%I A006944 M3744 #55 Jul 12 2022 13:01:05 %S A006944 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, %T A006944 11,9,11,12,11,12,11,11,13,12,11,8,10,11,10,11,10,10,12,11,10,8,10,11, %U A006944 10,11,10,10,12,11,10,8,10,11,10,11,10,10,12,11,10,10,12,13,12,13,12,12 %N A006944 Number of letters in the n-th ordinal number (in American English). %C A006944 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 %C A006944 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 %D A006944 Netnews group rec.puzzles, Frequently Asked Questions (FAQ) file (Science Section). %D A006944 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006944 Jon E. Schoenfield, <a href="/A006944/b006944.txt">Table of n, a(n) for n = 1..1000</a> %H A006944 Associated Press, <a href="https://www.apstylebook.com/">Stylebook</a> %H A006944 U.S. Government Printing Office, <a href="http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf">Style Manual 2008</a> %H A006944 Wikipedia, <a href="http://en.wikipedia.org/wiki/101_(number)">101</a> %H A006944 Wikipedia, <a href="http://en.wikipedia.org/wiki/English_numerals#Ordinal_numbers">English numerals</a> %H A006944 Wikipedia, <a href="http://en.wikipedia.org/wiki/Ordinal_number_(linguistics)">Ordinal numbers</a> %H A006944 <a href="/index/Lc#letters">Index entries for sequences related to number of letters in n</a> %e A006944 "First" has 5 letters, so a(1)=5. %e A006944 Hyphens and spaces are not counted, so, e.g., a(21)=11 ("twenty-first") and a(100)=12 ("one hundredth"). %o A006944 (Python) %o A006944 from num2words import num2words %o A006944 def a(n): return sum(1 for c in num2words(n, to='ordinal').replace(" and", "") if c.isalpha()) %o A006944 print([a(n) for n in range(1, 77)]) # _Michael S. Branicky_, Aug 08 2021 edited Jul 12 2022 %Y A006944 Cf. A005589. %Y A006944 Cf. A196278 (analog for French), A006969 (variant for French counting spaces and hyphens). %K A006944 nonn,word,nice,easy %O A006944 1,1 %A A006944 _N. J. A. Sloane_ %E A006944 More terms from _Jon E. Schoenfield_, Aug 13 2007