OFFSET
0,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,-1).
FORMULA
Euler transform of length 8 sequence [ -1, -1, 0, -1, 0, 0, 0, 1].
a(3 - n) = a(n). a(n + 4) = - a(n).
G.f.: (1 - x) * (1 - x^2) / (1 + x^4).
G.f.: 1 / (1 + x / (1 - 2*x / (1 + x / (1 + x / (1 + x^2 / (1 - x)))))). - Michael Somos, May 12 2012
G.f. A(x) = 1 - x / (1 - x / (1 + 2*x / (1 - x^3 / (1 - x / (1 + x / (1 - x)))))). - Michael Somos, Jan 03 2013
a(n) = A143431(n + 2).
EXAMPLE
G.f. = 1 - x - x^2 + x^3 - x^4 + x^5 + x^6 - x^7 + x^8 - x^9 - x^10 + x^11 + ...
MATHEMATICA
CoefficientList[Series[(1-x)*(1-x^2)/(1+x^4), {x, 0, 100}], x] (* G. C. Greubel, Sep 21 2018 *)
PadRight[{}, 120, {1, -1, -1, 1, -1, 1, 1, -1}] (* or *) LinearRecurrence[{0, 0, 0, -1}, {1, -1, -1, 1}, 120] (* Harvey P. Dale, May 27 2023 *)
PROG
(PARI) a(n) = (-1)^(n + (n+2)\4)
(Magma) m:=100; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x)*(1-x^2)/(1+x^4))); // G. C. Greubel, Sep 21 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Jun 29 2009
STATUS
approved