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 A199921 #29 Feb 16 2025 08:33:16 %S A199921 7,31,93,215,389,573,691,691,573,389,215,93,31,7,1 %N A199921 Number of Roman numerals < 4000 with n letters. %C A199921 Note that the sequence is completely symmetrical with the addition of the single (notional) Roman string of length zero. - _Ian Duff_, Jun 27 2017 %H A199921 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RomanNumerals.html">Roman Numerals</a>. %H A199921 Wikipedia, <a href="http://en.wikipedia.org/wiki/Roman_numerals">Roman numerals</a> %e A199921 a(1) = 7, since there are the seven one-letter roman numerals I, V, X, L, C, D, M. %e A199921 a(15) = 1, since there is one fifteen-letter roman numeral MMMDCCCLXXXVIII. %p A199921 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: %p A199921 seq(nops(L[i]),i=1..15); # _Martin Renner_, Nov 13 2011 %t A199921 romanLetterCount = Table[0, {15}]; j = 1; While[j < 4000, romanLetterCount[[StringLength[IntegerString[j, "Roman"]]]]++; j++]; romanLetterCount (* _Alonso del Arte_, Nov 12 2011 *) %t A199921 Rest[BinCounts[StringLength[RomanNumeral[Range[3999]]]]] (* _Paolo Xausa_, Mar 19 2024 *) %o A199921 (Haskell) %o A199921 import Data.List (group, sort) %o A199921 a199921 n = a199921_list !! (n-1) %o A199921 a199921_list = map length $ group $ sort $ map (a055642 . a061493) [1..3999] %o A199921 -- _Reinhard Zumkeller_, Apr 14 2013 %Y A199921 Cf. A003587, A006968. %Y A199921 Cf. A055642, A061493. %K A199921 nonn,fini,full %O A199921 1,1 %A A199921 _Martin Renner_, Nov 12 2011