login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002963 Chisel strokes required for Roman numerals for n. 16
1, 2, 3, 3, 2, 3, 4, 5, 3, 2, 3, 4, 5, 5, 4, 5, 6, 7, 5, 4, 5, 6, 7, 7, 6, 7, 8, 9, 7, 6, 7, 8, 9, 9, 8, 9, 10, 11, 9, 4, 5, 6, 7, 7, 6, 7, 8, 9, 7, 2, 3, 4, 5, 5, 4, 5, 6, 7, 5, 4, 5, 6, 7, 7, 6, 7, 8, 9, 7, 6, 7, 8, 9, 9, 8, 9, 10, 11, 9, 8, 9, 10, 11, 11, 10, 11, 12, 13, 11, 4, 5, 6, 7, 7, 6, 7, 8, 9, 7, 2, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Chisel strokes for numerals: I,1; V,2; X,2; L,2; C ( = < ),2; D,3; M,4.

For more about Roman numerals, see A006968.

a(A002964(n)) = n. - Reinhard Zumkeller, Apr 14 2013

LINKS

Nathaniel Johnston, Table of n, a(n) for n = 1..3999

Eric Weisstein's World of Mathematics, Roman Numerals

Wikipedia, Roman numerals

MAPLE

with(StringTools): A002963 := proc(n) local r: r:=convert(n, roman): return add(parse(SubstituteAll( SubstituteAll( SubstituteAll( SubstituteAll( SubstituteAll( SubstituteAll( SubstituteAll(r[j], "I", "1"), "V", "2"), "X", "2"), "L", "2"), "C", "2"), "D", "3"), "M", "4")), j=1..length(r)): end: seq(A002963(n), n=1..102); # Nathaniel Johnston, May 18 2011

MATHEMATICA

a[n_] := Characters[ IntegerString[n, "Roman"]] /. {"I" -> 1, "V" -> 2, "X" -> 2, "L" -> 2, "C" -> 2, "D" -> 3, "M" -> 4} // Total; Table[a[n], {n, 1, 102}] (* Jean-Fran├žois Alcover, Sep 10 2013 *)

PROG

(Haskell)

a002963 = ch 0 . a061493 where

     ch s 0 = s

     ch s x = ch (s + [0, 1, 2, 2, 2, 2, 3, 4] !! d') x'

              where  (x', d) = divMod x 10; d' = fromInteger d

-- Reinhard Zumkeller, Apr 14 2013

(PARI) {A002963(n, c=[1000, 4, 900, 6, 500, 3, 400, 5, 100, 2, 90, 4, 50, 2, 40, 4, 10, 2, 9, 3, 5, 2, 4, 3, 1, 1], s=0)= forstep(i=1, #c, 2, while(n>=c[i], n-=c[i]; s+=c[i+1])); s} \\ M. F. Hasler, Jul 27 2016

CROSSREFS

Cf. A119310.

Cf. A061493, A093783.

Sequence in context: A248222 A107918 A242392 * A046677 A283104 A109747

Adjacent sequences:  A002960 A002961 A002962 * A002964 A002965 A002966

KEYWORD

base,easy,nonn,nice

AUTHOR

N. J. A. Sloane.

EXTENSIONS

More terms from David W. Wilson.

Data double-checked by M. F. Hasler, Jul 27 2016

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 19 07:12 EDT 2017. Contains 290794 sequences.