|
|
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.
|
|
LINKS
|
|
|
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
Helge T. Blohmer (crusher(AT)k-town.de), Sep 19 2000
|
|
STATUS
|
approved
|
|
|
|