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.

A199921 Number of Roman numerals < 4000 with n letters.

Original entry on oeis.org

7, 31, 93, 215, 389, 573, 691, 691, 573, 389, 215, 93, 31, 7, 1
Offset: 1

Views

Author

Martin Renner, Nov 12 2011

Keywords

Comments

Note that the sequence is completely symmetrical with the addition of the single (notional) Roman string of length zero. - Ian Duff, Jun 27 2017

Examples

			a(1) = 7, since there are the seven one-letter roman numerals I, V, X, L, C, D, M.
a(15) = 1, since there is one fifteen-letter roman numeral MMMDCCCLXXXVIII.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, sort)
    a199921 n = a199921_list !! (n-1)
    a199921_list = map length $ group $ sort $ map (a055642 . a061493) [1..3999]
    -- Reinhard Zumkeller, Apr 14 2013
  • Maple
    for i from 1 to 15 do L[i]:={}: od: for n from 1 to 3999 do L[length(convert(n,roman))]:={op(L[length(convert(n,roman))]),n}; od:
    seq(nops(L[i]),i=1..15); # Martin Renner, Nov 13 2011
  • Mathematica
    romanLetterCount = Table[0, {15}]; j = 1; While[j < 4000, romanLetterCount[[StringLength[IntegerString[j, "Roman"]]]]++; j++]; romanLetterCount (* Alonso del Arte, Nov 12 2011 *)
    Rest[BinCounts[StringLength[RomanNumeral[Range[3999]]]]] (* Paolo Xausa, Mar 19 2024 *)