login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A162285
Periodic length 8 sequence [1, -1, -1, 1, -1, 1, 1, -1, ...].
0
1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1
OFFSET
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
Cf. A143431.
Sequence in context: A121241 A122188 A158388 * A186035 A358766 A359154
KEYWORD
sign,easy
AUTHOR
Michael Somos, Jun 29 2009
STATUS
approved