cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A162285 Periodic length 8 sequence [1, -1, -1, 1, -1, 1, 1, -1, ...].

Original entry on oeis.org

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

Views

Author

Michael Somos, Jun 29 2009

Keywords

Examples

			G.f. = 1 - x - x^2 + x^3 - x^4 + x^5 + x^6 - x^7 + x^8 - x^9 - x^10 + x^11 + ...
		

Crossrefs

Cf. A143431.

Programs

  • Magma
    m:=100; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x)*(1-x^2)/(1+x^4))); // G. C. Greubel, Sep 21 2018
  • 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 *)
  • PARI
    a(n) = (-1)^(n + (n+2)\4)
    

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).