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.

A093783 Sum of digits of n in Roman numeral representation.

This page as a plain text file.
%I A093783 #25 Feb 16 2025 08:32:53
%S A093783 1,2,3,6,5,6,7,8,11,10,11,12,13,16,15,16,17,18,21,20,21,22,23,26,25,
%T A093783 26,27,28,31,30,31,32,33,36,35,36,37,38,41,60,61,62,63,66,65,66,67,68,
%U A093783 71,50,51,52,53,56,55,56,57,58,61,60,61,62,63,66,65,66,67,68
%N A093783 Sum of digits of n in Roman numeral representation.
%H A093783 Nathaniel Johnston, <a href="/A093783/b093783.txt">Table of n, a(n) for n = 1..3999</a>
%H A093783 Stephanus Gibbs, <a href="http://www.softhawkway.com/rcalc.htm">Roman Numeral and Date Conversion</a>
%H A093783 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RomanNumerals.html">Roman Numerals</a>
%H A093783 Wikipedia, <a href="http://en.wikipedia.org/wiki/Roman_numerals">Roman numerals</a>
%e A093783 n=42 == XLII: a(42) = 'X' + 'L' + 'I' + 'I' = 10+50+1+1 = 62.
%p A093783 A093783 := proc(n) local r: r:=convert(n, roman): return add(convert(r[j], arabic), j=1..length(r)): end: seq(A093783(n), n=1..68); # _Nathaniel Johnston_, May 18 2011
%t A093783 Total[#2 FromRomanNumeral[#1] & @@@ Tally[Characters@ RomanNumeral@ #]] & /@ Range@ 68 (* _Michael De Vlieger_, Sep 08 2015, Version 10.2 *)
%o A093783 (Haskell)
%o A093783 a093783 n = q 0 $ a061493 n where
%o A093783      q s 0 = s
%o A093783      q s x = q (s + [0,1,5,10,50,100,500,1000] !! d') x'
%o A093783              where  (x',d) = divMod x 10; d' = fromInteger d
%o A093783 -- _Reinhard Zumkeller_, Apr 14 2013
%o A093783 (HP 49G calculator)
%o A093783 ::
%o A093783   CK1&Dispatch
%o A093783   # FF
%o A093783   ::
%o A093783     FPTR2 ^DupQIsZero?
%o A093783     caseSIZEERR
%o A093783     FPTR2 ^Z>S
%o A093783     Z0_
%o A093783     SWAP
%o A093783     DUPLEN$
%o A093783     ZERO_DO
%o A093783     DUP
%o A093783     ISTOP-INDEX
%o A093783     SUB$1#
%o A093783     BINT48
%o A093783     #-
%o A093783     BINT4
%o A093783     OVER#=
%o A093783     OVER
%o A093783     BINT9
%o A093783     #=
%o A093783     OR
%o A093783     IT
%o A093783     #2+
%o A093783     FPTR2 ^#>Z
%o A093783     Z10_
%o A093783     INDEX@
%o A093783     FPTR2 ^RP#
%o A093783     FPTR2 ^RMULText
%o A093783     ROT
%o A093783     FPTR2 ^RADDext
%o A093783     SWAPLOOP
%o A093783     DROP
%o A093783   ;
%o A093783 ;
%o A093783 _Gerald Hillier_, Sep 08 2015
%Y A093783 Cf. A007953, A057226, A006968.
%Y A093783 Cf. A061493, A002963.
%K A093783 nonn,easy,base
%O A093783 1,2
%A A093783 _Reinhard Zumkeller_, May 17 2004