login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A278313
Number of letters "I" in Roman numeral representation of n.
1
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,2
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
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
EXAMPLE
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.
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 *)
PROG
(Magma) &cat [[1, 2, 3, 1, 0]^^30]; // Wesley Ivan Hurt, Dec 26 2016
(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
CROSSREFS
Cf. A006968.
Sequence in context: A321897 A050074 A346688 * A006705 A031269 A006703
KEYWORD
nonn,base
AUTHOR
STATUS
approved

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy