The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A093783 Sum of digits of n in Roman numeral representation. 4
 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, 26, 27, 28, 31, 30, 31, 32, 33, 36, 35, 36, 37, 38, 41, 60, 61, 62, 63, 66, 65, 66, 67, 68, 71, 50, 51, 52, 53, 56, 55, 56, 57, 58, 61, 60, 61, 62, 63, 66, 65, 66, 67, 68 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Nathaniel Johnston, Table of n, a(n) for n = 1..3999 Stephanus Gibbs, Roman Numeral and Date Conversion [Broken link] Eric Weisstein's World of Mathematics, Roman Numerals Wikipedia, Roman numerals EXAMPLE n=42 == XLII: a(42) = 'X' + 'L' + 'I' + 'I' = 10+50+1+1 = 62. MAPLE 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 MATHEMATICA Total[#2 FromRomanNumeral[#1] & @@@ Tally[Characters@ RomanNumeral@ #]] & /@ Range@ 68 (* Michael De Vlieger, Sep 08 2015, Version 10.2 *) PROG (Haskell) a093783 n = q 0 \$ a061493 n where      q s 0 = s      q s x = q (s + [0, 1, 5, 10, 50, 100, 500, 1000] !! d') x'              where  (x', d) = divMod x 10; d' = fromInteger d -- Reinhard Zumkeller, Apr 14 2013 (HP 49G calculator) ::   CK1&Dispatch   # FF   ::     FPTR2 ^DupQIsZero?     caseSIZEERR     FPTR2 ^Z>S     Z0_     SWAP     DUPLEN\$     ZERO_DO     DUP     ISTOP-INDEX     SUB\$1#     BINT48     #-     BINT4     OVER#=     OVER     BINT9     #=     OR     IT     #2+     FPTR2 ^#>Z     Z10_     INDEX@     FPTR2 ^RP#     FPTR2 ^RMULText     ROT     FPTR2 ^RADDext     SWAPLOOP     DROP   ; ; Gerald Hillier, Sep 08 2015 CROSSREFS Cf. A007953, A057226, A006968. Cf. A061493, A002963. Sequence in context: A023889 A327669 A253413 * A096861 A118738 A175067 Adjacent sequences:  A093780 A093781 A093782 * A093784 A093785 A093786 KEYWORD nonn,easy,base AUTHOR Reinhard Zumkeller, May 17 2004 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 7 08:08 EDT 2020. Contains 336274 sequences. (Running on oeis4.)