The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A061493 Roman numerals written using 1 for I, 2 for V, 3 for X, 4 for L, 5 for C, 6 for D, 7 for M. 19
 1, 11, 111, 12, 2, 21, 211, 2111, 13, 3, 31, 311, 3111, 312, 32, 321, 3211, 32111, 313, 33, 331, 3311, 33111, 3312, 332, 3321, 33211, 332111, 3313, 333, 3331, 33311, 333111, 33312, 3332, 33321, 333211, 3332111, 33313, 34, 341, 3411, 34111, 3412 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS From Daniel Forgues, Jan 16 2015: (Start) The Romans did not have 0 as a number, which is why there was no year zero (1 B.C. is followed by 1 A.D.). The initial "N" (nulla, meaning "nothing") was used as a zero symbol in a table of Roman numerals by Bede or his colleague around 725. (End) 3999 (MMMCMXCIX) is the largest decimal number that has a well-defined Roman numeral representation. Therefore the sequence deliberately stops there to avoid the ambiguous representations of larger numbers. - Jamie Robert Creasey, May 01 2021 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..3999 Gerard Schildberger, The first 3999 numbers in Roman numerals Eric Weisstein's World of Mathematics, Roman Numerals Wikipedia, Roman numerals Wikipedia, 0 (number) in classical antiquity FORMULA a(n)=i <=> A003587(i)=n, for i in {1,...,7}, i.e., A061493 is a left inverse of A003587 on {1,...,7}. - M. F. Hasler, Jan 12 2015 EXAMPLE a(14) = 312 because 14 = XIV in Roman, and I,V,X are coded as 1,2,3 respectively. a(66)= 4321, LXVI is 50+10+5+1= 66, a(44)=3412, XLIV is -10+50-1+5= 44 MATHEMATICA Array[FromDigits[Characters@ RomanNumeral[#] /. {"I" -> 1, "V" -> 2, "X" -> 3, "L" -> 4, "C" -> 5, "D" -> 6, "M" -> 7}] &, 44] (* Michael De Vlieger, May 01 2021 *) PROG (Haskell) a061493 n = read \$ r 1 [] n :: Integer where   r _ roms 0 = roms   r p roms z = case p of     1 -> r 2 (d '1' '2' '3' m) z'     2 -> r 3 (d '3' '4' '5' m ++ roms) z'     3 -> r 4 (d '5' '6' '7' m ++ roms) z'     4 -> replicate z '7' ++ roms     where (z', m) = divMod z 10   d i j k c =     [[], [i], [i, i], [i, i, i], [i, j], [j], [j, i], [j, i, i], [j, i, i, i], [i, k]] !! c -- Reinhard Zumkeller, Apr 14 2013 (PARI) {A061493(n, s="", c=[1000, 7, 900, 57, 500, 6, 400, 56, 100, 5, 90, 35, 50, 4, 40, 34, 10, 3, 9, 13, 5, 2, 4, 12, 1, 1])= forstep(i=1, #c, 2, while(n>=c[i], n-=c[i]; s=Str(s, c[i+1]))); eval(s)} \\ M. F. Hasler, Jan 11 2015 (Python) def f(s, k):     return s[:2] if k==4 else (s*(k>=5)+s*(k%5) if k<9 else s+s) def a(n):     m, c, x, i = n//1000, (n%1000)//100, (n%100)//10, n%10     return int("7"*m + f("567", c) + f("345", x) + f("123", i)) print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Aug 24 2022 CROSSREFS Cf. A006968, A002963, A003587, A036787, A057226. Cf. A036746, A036786, A036788, A160676, A160677, A199921. Sequence in context: A259372 A348871 A004287 * A093788 A327992 A204847 Adjacent sequences:  A061490 A061491 A061492 * A061494 A061495 A061496 KEYWORD easy,nonn,base AUTHOR Frank Ellermann, Jun 12 2001 EXTENSIONS 0 removed again by Georg Fischer, Jan 20 2019 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.

Last modified October 7 08:31 EDT 2022. Contains 357270 sequences. (Running on oeis4.)