login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A130659
Period 4: repeat [0, 1, 2, 4].
0
0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4, 0, 1, 2, 4
OFFSET
0,3
FORMULA
a(n+4) = a(n).
a(n) = floor((5*n+1)/4) mod 5. - Gary Detlefs, May 15 2011
From Bruno Berselli, May 16 2011: (Start)
G.f.: x*(1+2*x+4*x^2)/(1-x^4).
a(n) = (5-(-1)^n)*(6-2*I^(n*(n-1)))/8-2. (End)
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) = (7-3*I^(2*n)-(2+3*I)*I^(-n)-(2-3*I)*I^n)/4.
a(n) = (7-3*cos(n*Pi)-4*cos(n*Pi/2)-6*sin(n*Pi/2)-3*I*sin(n*Pi))/4. (End)
MAPLE
seq(op([0, 1, 2, 4]), n=0..40); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 100, {0, 1, 2, 4}] (* Wesley Ivan Hurt, Jul 09 2016 *)
PROG
(Magma) &cat [[0, 1, 2, 4]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
Sequence in context: A276995 A074078 A309635 * A083741 A258761 A256245
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jun 21 2007
EXTENSIONS
Name rewritten by Bruno Berselli, May 16 2011
STATUS
approved