OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
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
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jun 21 2007
EXTENSIONS
Name rewritten by Bruno Berselli, May 16 2011
STATUS
approved