OFFSET
0,3
LINKS
FORMULA
a(n) = A061347(n+1) * (-1)^floor(n/3).
From Wesley Ivan Hurt, Jun 21 2016: (Start)
G.f.: (1+x-2*x^2)/(1+x^3).
a(n) + a(n-3) = 0 for n>2.
a(n) = (5*cos(n*Pi/3) - 2*cos(n*Pi) - sqrt(3)*sin(n*Pi/3))/3. (End)
MAPLE
A132419:=n->[1, 1, -2, -1, -1, 2][(n mod 6)+1]: seq(A132419(n), n=0..100); # Wesley Ivan Hurt, Jun 21 2016
MATHEMATICA
PadRight[{}, 100, {1, 1, -2, -1, -1, 2}] (* Wesley Ivan Hurt, Jun 21 2016 *)
PROG
(PARI) a(n)=[1, 1, -2, -1, -1, 2][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
(Magma) &cat [[1, 1, -2, -1, -1, 2]^^20]; // Wesley Ivan Hurt, Jun 21 2016
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Nov 13 2007
EXTENSIONS
Comment changed to formula by Wesley Ivan Hurt, Jun 21 2016
STATUS
approved