cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 41-46 of 46 results.

A278313 Number of letters "I" in Roman numeral representation of n.

Original entry on oeis.org

1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0, 1, 2, 3, 1, 0
Offset: 1

Views

Author

Keywords

Comments

Period 5: repeat [1, 2, 3, 1, 0]. - Omar E. Pol, Nov 19 2016
For large numbers we have the examples: 8000 -> VMMM (underline the V); 80000 -> LXXX (underline the LXXX); 800000 -> DCCC (underline the DCCC); ... see The Rules of Roman Numerals under Links. - José de Jesús Camacho Medina, Nov 21 2016

Examples

			a(1) = 1 because 1 in Roman numerals is I, which contains only one I.
a(2) = 2 because 2 in Roman numerals is II, which contains two I's.
a(3) = 3 because 3 in Roman numerals is III, which contains three I's.
a(4) = 1 because 4 in Roman numerals is IV, which contains only one I.
a(5) = 0 because 5 in Roman numerals is V, which does not contain I's.
a(6) = 1 because 6 in Roman numerals is VI, which contains only one I.
a(7) = 2 because 7 in Roman numerals is VII, which contains two I's.
a(8) = 3 because 8 in Roman numerals is VIII, which contains three I's.
a(9) = 1 because 9 in Roman numerals is IX, which contains only one I.
a(10) = 0 because 10 in Roman numerals is X, which does not contain I's.
a(50) = 0 because 50 in Roman numerals is L, which does not contain I's.
a(100) = 0 because 100 in Roman numerals is C, which does not contain I's.
a(500) = 0 because 500 in Roman numerals is D, which does not contain I's.
a(551) = 1 because 551 in Roman numerals is DLI, which contains only one I.
a(1000) = 0 because 1000 in Roman numerals is M, which does not contain I's.
a(1001) = 1 because 1001 in Roman numerals is MI, which contains only one I.
		

Crossrefs

Cf. A006968.

Programs

  • Magma
    &cat [[1, 2, 3, 1, 0]^^30]; // Wesley Ivan Hurt, Dec 26 2016
    
  • Maple
    A278313:= n -> [1, 2, 3, 1, 0][(n mod 5)+1]: seq(A278313(n), n=0..100); # Wesley Ivan Hurt, Dec 26 2016
  • Mathematica
    Table[Mod[n, 5] - Mod[3n + 2n^2 + 3n^3 + 2n^4, 5], {n, 100}]
    Table[StringCount[RomanNumeral@ n, "I"], {n, 105}] (* Michael De Vlieger, Nov 24 2016, Version 10.2 *)
  • PARI
    Vec(x*(1 + 2*x + 3*x^2 + x^3)/((1 - x)*(1 + x + x^2 + x^3 + x^4)) + O(x^50)) \\ G. C. Greubel, Dec 26 2016

Formula

a(n) = (n mod 5) - ((3n + 2n^2 + 3n^3 + 2n^4) mod 5).
G.f.: x*(1 + 2*x + 3*x^2 + x^3)/((1 - x)*(1 + x + x^2 + x^3 + x^4)). - Ilya Gutkovskiy, Nov 20 2016
From Wesley Ivan Hurt, Dec 26 2016: (Start)
a(n) = a(n-5) for n > 5.
a(n) = (7 + (n mod 5) + 2*((n+1) mod 5) - ((n+2) mod 5) - ((n+3) mod 5) - ((n+4) mod 5))/5. (End)
a(n) = 1 + (2/5)*(1 + 2*cos(2*(n-3)*Pi/5) + 2*cos(4*(n-3)*Pi/5) + cos(2*(n-2)*Pi/5) + cos(4*(n-2)*Pi/5) - cos(2*n*Pi/5) - cos(4*n*Pi/5)). - Wesley Ivan Hurt, Oct 04 2018

A285511 Value of the n-th Roman number interpreted as Latin alphabetic number.

Original entry on oeis.org

9, 243, 6327, 256, 22, 581, 15115, 392999, 258, 24, 633, 16467, 428151, 16480, 646, 16805, 436939, 11360423, 16482, 648, 16857, 438291, 11395575, 438304, 16870, 438629, 11404363, 296513447, 438306, 16872, 438681, 11405715, 296548599, 11405728, 438694, 11406053, 296557387, 7710492071, 11405730, 636
Offset: 1

Views

Author

Martin Janecke, Apr 20 2017

Keywords

Comments

Lists can be numbered using different counter styles, for example using the Latin alphabet A, B, C, ..., Z, AA, AB, ... or the Roman number system I, II, III, IV, V, VI, ... Both these counter styles are defined in CSS Counter Styles Level 3 as "upper-alpha" and "upper-roman". Roman number representations are defined for the range 1 to 3999 only. Roman numerals are a subset of Latin alphabet letters; for every Roman number there is exactly one alphabetic number that looks identical. Denote the n-th Roman number by R(n) and the m-th alphabetic number by L(m), then R(n) and L(a(n)) look identical.

Examples

			The number n = 1 is written "I" in the Roman number system. "I" being the ninth letter in the alphabet is also the ninth number in the alphabetic number system. Therefore a(1) = 9.
The number n = 2 is written "II" in the Roman number system. "II" is also the 243rd number in the alphabetic number system, because "I" is the ninth letter in the 26-letter alphabet and 9*26^1+9*26^0 = 243. Therefore a(2) = 243.
The number n = 3 is written "III" in the Roman number system. "III" is also the 6327th number in the alphabetic number system because "I" is the ninth letter in the 26-letter alphabet and 9*26^2+9*26^1+9*26^0 = 6327. Therefore a(3) = 6327.
The number n = 4 is written "IV" in the Roman number system. "IV" is also the 256th number in the alphabetic number system because "I" is the ninth letter in the 26-letter alphabet and "V" is the 22nd letter, therefore a(4) = 9*26^1 + 22 = 256.
The number n = 600 is written "DC" in the Roman number system. "DC" is also the 107th number in the alphabetic number system, because "D" and "C" are the fourth and third letters in the 26-letter alphabet and 4*26^1+3*26^0 = 107. Therefore a(600) = 107.
		

Crossrefs

A160754 Numbers k such that k, 2k, 3k and 4k use the same number of characters when expressed in Roman numerals.

Original entry on oeis.org

36, 153, 315, 351, 360, 448, 736, 1386
Offset: 1

Views

Author

Claudio Meller, May 25 2009

Keywords

Comments

This sequence is complete up to 3999.

Examples

			1*36 =  36 = XXXVI,
2*36 =  72 = LXXII,
3*36 = 108 = CVIII,
4*36 = 144 = CXLIV,
so 36 is a term;
1*153 = 153 = CLIII,
2*153 = 306 = CCCVI,
3*153 = 459 = CDLIX,
4*153 = 612 = DCXII,
so 153 is a term.
		

Crossrefs

See A006968 for the basic underlying sequence.

Programs

  • Maple
    for n from 1 to 3999 do if(length(convert(n, roman)) = length(convert(2*n, roman)) and length(convert(n, roman)) = length(convert(3*n, roman)) and length(convert(n, roman)) = length(convert(4*n, roman)))then printf("%d, ", n): fi: od: # Nathaniel Johnston, May 18 2011

Extensions

a(8) from Nathaniel Johnston, May 18 2011

A215121 Strobogrammatic palindromic numbers in their Roman numeral representation.

Original entry on oeis.org

1, 2, 3, 10, 19, 20, 30
Offset: 1

Views

Author

Jonathan Vos Post, Aug 03 2012

Keywords

Comments

Numbers which, written as Roman numerals, are the same upside down and backwards.
Upside-down-invariant numbers are also called ambigrams. "Upside down" here means rotated by 180 degrees (i.e., central symmetry), NOT "vertically flipped" (symmetry w.r.t. horizontal line).
V, L, C, D, M (5, 50, 100, 500, 1000 in decimal) are not the same upside-down. Excludes "old style" Roman numeral representation of n (e.g., IIII rather than IV).

Examples

			I, II, III, X, XIX, XX, XXX.
		

Crossrefs

A269624 Length of the shortest generalized Roman numeral representation of n.

Original entry on oeis.org

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
Offset: 1

Views

Author

David Spies, Mar 01 2016

Keywords

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.

Examples

			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.

A362960 Length of longest Roman numeral representation of a number <= n.

Original entry on oeis.org

1, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 1

Views

Author

Leyang Zou, Aug 05 2023

Keywords

Crossrefs

Cf. A006968.

Formula

a(n) = max_{i=1..n} A006968(i).
Previous Showing 41-46 of 46 results.