OFFSET
0,6
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, -1, 1, -1).
FORMULA
Euler transform of length 10 sequence [ 1, -1, 0, -1, -1, 0, 0, 0, 0, 1].
a(-n) = a(n). a(n + 5) = -a(n) unless n=0 or n=-5.
G.f.: (1 - x^4) / (1 - x + x^2 - x^3 + x^4).
MATHEMATICA
CoefficientList[Series[(1 - x^4) / (1 - x + x^2 - x^3 + x^4), {x, 0, 50}], x] (* G. C. Greubel, Sep 12 2017 *)
PROG
(PARI) {a(n) = -(n==0) + [2, 1, 0, 0, -1, -2, -1, 0, 0, 1][n%10 + 1]}
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Aug 10 2009
STATUS
approved