OFFSET
0,1
COMMENTS
Old definition was: "First differences of 5^n mod 9".
LINKS
FORMULA
G.f.: (x^2 + 2*x + 4)/(x^3 + 1). - Chai Wah Wu, Jun 04 2016
From Wesley Ivan Hurt, Jun 28 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = a(n-6) for n>5.
a(n) = cos(n*Pi) + 3*cos(n*Pi/3) + sqrt(3)*sin(n*Pi/3). (End)
MAPLE
A132708:= n -> [4, 2, 1, -4, -2, -1][(n mod 6)+1]: seq(A132708(n), n=0..100); # Wesley Ivan Hurt, Jun 28 2016
MATHEMATICA
PadRight[{}, 120, {4, 2, 1, -4, -2, -1}] (* Harvey P. Dale, Nov 21 2015 *)
Differences[PowerMod[5, Range[0, 90], 9]] (* Alonso del Arte, Jun 04 2016 *)
PROG
(Magma) &cat [[4, 2, 1, -4, -2, -1]^^30]; // Wesley Ivan Hurt, Jun 28 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Nov 16 2007
EXTENSIONS
Name changed by Wesley Ivan Hurt, Jun 28 2016
STATUS
approved