OFFSET
0,2
LINKS
FORMULA
G.f.: x*(2+x)/((x+1)*(x^2-x+1)) = (1/3)*(4*x+1)/(x^2-x+1)-(1/3)/(x+1). - R. J. Mathar, Nov 28 2007
a(n) + a(n+1) = A117373(n+4). - R. J. Mathar, Jul 22 2009
a(n) = (-n mod 3) * (-1)^floor(n/3) = A080425(n) * (-1)^A002264(n) = A080425(n) * A130151(n). - Wesley Ivan Hurt, Jun 20 2014
From Wesley Ivan Hurt, Jun 21 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = sin(n*Pi/3) * (3*sqrt(3) + 2*sin(2*n*Pi/3))/3. (End)
MAPLE
MATHEMATICA
Table[Mod[-n, 3]*(-1)^Floor[n/3], {n, 0, 50}] (* Wesley Ivan Hurt, Jun 20 2014 *)
PROG
(Magma) [(-n mod 3)*(-1)^Floor(n/3) : n in [0..50]]; // Wesley Ivan Hurt, Jun 20 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Nov 21 2007
STATUS
approved