login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057226 Number of different symbols needed to express n as a Roman numeral. 5
1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 3, 2, 3, 3, 3, 2, 1, 2, 2, 2, 3, 2, 3, 3, 3, 2, 1, 2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 3, 3, 3, 4, 3, 4, 4, 4, 3, 1, 2, 2, 2, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 4, 3, 4, 4, 4, 3, 2, 3, 3, 3, 4, 3, 4, 4, 4, 3, 2, 3, 3, 3, 4, 3, 4, 4, 4, 3, 2, 3, 3, 3, 4, 3, 4, 4, 4, 3, 1, 2, 2, 2, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Sequence created using classic Roman numerals, i.e., 99 = XCIX, not the questionable IC.
a(n) = a043537(A061493(n)). - Reinhard Zumkeller, Apr 14 2013
LINKS
Eric Weisstein's World of Mathematics, Roman Numerals
Wikipedia, Roman numerals
EXAMPLE
a(97) = 4 as you need I, V, X and C to express XCVII.
MAPLE
with(StringTools): A057226 := proc(n) local r: r:=convert(n, roman): return `if`(Search("I", r)>0, 1, 0) + `if`(Search("V", r)>0, 1, 0) + `if`(Search("X", r)>0, 1, 0) + `if`(Search("L", r)>0, 1, 0) + `if`(Search("C", r)>0, 1, 0) + `if`(Search("D", r)>0, 1, 0) + `if`(Search("M", r)>0, 1, 0): end: seq(A057226(n), n=1..105); # Nathaniel Johnston, May 18 2011
MATHEMATICA
Table[Length[Union[Characters[IntegerString[n, "Roman"]]]], {n, 110}] (* Harvey P. Dale, Mar 18 2013 *)
PROG
(Haskell)
a057226 = a043537 . a061493 -- Reinhard Zumkeller, Apr 14 2013
CROSSREFS
Sequence in context: A230643 A344117 A163367 * A338260 A224963 A073810
KEYWORD
base,easy,nonn
AUTHOR
Helge T. Blohmer (crusher(AT)k-town.de), Sep 19 2000
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 09:51 EDT 2024. Contains 372332 sequences. (Running on oeis4.)