OFFSET
0,2
COMMENTS
First differences of A154127.
LINKS
FORMULA
G.f.: ( 1+3*x+3*x^2 ) / ( (1+x)*(x^2-x+1) ). - R. J. Mathar, Dec 04 2011
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = (cos(n*Pi) + 2*cos(n*Pi/3) + 6*sqrt(3)*sin(n*Pi/3))/3. (End)
MAPLE
A154595:=n->[1, 3, 3, -1, -3, -3][(n mod 6)+1]: seq(A154595(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
MATHEMATICA
PadRight[{}, 120, {1, 3, 3, -1, -3, -3}] (* Harvey P. Dale, Aug 09 2013 *)
PROG
(Magma) &cat [[1, 3, 3, -1, -3, -3]^^20]; // Wesley Ivan Hurt, Jun 23 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Jan 12 2009
EXTENSIONS
Edited by N. J. A. Sloane, Jan 12 2009
STATUS
approved