login
A152894
Periodic sequence [0,0,1,4,0] of period 5.
1
0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0, 1, 4, 0, 0, 0
OFFSET
0,4
FORMULA
a(n+5) = a(n) with a(0) = a(1) = a(4) = 0, a(2) = 1 and a(3) = 4;
O.g.f.: (z^2+4*z^3)/(1-z^5);
a(n) = 1 + (-1/2 - (1/2)*sqrt(5))*cos(2*n*Pi/5) + (-(3/10)*sqrt(2)*sqrt(5 - sqrt(5)))*sin(2*n*Pi/5) + (-1/2 + (1/2)*sqrt(5))*cos(4*n*Pi/5) + ((3/10)*sqrt(2)*sqrt(5 + sqrt(5)))*sin(4*n*Pi/5).
a(n) = (n^3 - n) mod 5. - Gary Detlefs, Mar 20 2010
MAPLE
seq((n^3-n) mod 5, n=0..50); # Gary Detlefs, Mar 20 2010
MATHEMATICA
PadRight[{}, 90, {0, 0, 1, 4, 0}] (* Harvey P. Dale, Jan 29 2013 *)
CROSSREFS
Cf. A026062.
Sequence in context: A343316 A277115 A291447 * A152898 A368661 A369009
KEYWORD
easy,nonn
AUTHOR
Richard Choulet, Dec 14 2008
STATUS
approved