OFFSET
0,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,1,0,0,-1).
FORMULA
O.g.f.: (1-x)(x^2+1)x/(1-x^3+x^6). a(n)=a(n-3)-a(n-6). - R. J. Mathar, Jun 12 2008
MATHEMATICA
PadRight[{}, 18*5, {0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 0}] (* Harvey P. Dale, Dec 11 2011 *)
PROG
(PARI) a(n)=[0, 1, -1, 1, 0, -1, 1, -1, 0][n%9+1]*(-1)^(n\9%2) \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, May 26 2008
STATUS
approved