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!)
 A269624 Length of the shortest generalized Roman numeral representation of n. 0
 1, 2, 3, 2, 1, 2, 3, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 5, 4, 3, 4, 5, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 5, 4, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 4, 5, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS In generalized Roman numerals, any sequence of characters from I,V,X,L,C,D,M can be interpreted uniquely as an (possibly negative) integer. So for instance IIX = 10 - 2 = 8 and IVXX = 20 - (5 - 1) = 16. The rule is: 1. First look for the first instance of the largest character in the string. 2. Everything preceding it is recursively evaluated and subtracted from the value. 3. Everything after it is recursively evaluated and added to the value. LINKS EXAMPLE For numbers up to 50, one possible shortest representation is: I, II, III, IV, V, VI, VII, IIX, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XIIX, XIX, XX, XXI, XXII, XXIII, XXIV, XXV, XXVI, XXVII, XXIIX, XXIX, XXX, XXXI, XXXII, XVIIL, XVIL, XVL, XVLI, XVLII, XIIL, XIL, XL, XLI, XLII, VIIL, VIL, VL, VLI, VLII, IIL, IL, L. CROSSREFS Cf. A006968. Sequence in context: A320858 A304111 A030314 * A098236 A152978 A118121 Adjacent sequences:  A269621 A269622 A269623 * A269625 A269626 A269627 KEYWORD nonn,base AUTHOR David Spies, Mar 01 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 26 13:25 EDT 2021. Contains 347668 sequences. (Running on oeis4.)