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.

A219977 Expansion of 1/(1+x+x^2+x^3).

Original entry on oeis.org

1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0
Offset: 0

Views

Author

Harvey P. Dale, Dec 02 2012

Keywords

Examples

			G.f. = 1 - x + x^4 - x^5 + x^8 - x^9 + x^12 - x^13 + x^16 - x^17 + x^20 - x^21 + ...
		

Crossrefs

Programs

  • Magma
    m:=100; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1+x+x^2+x^3))); // Vincenzo Librandi, Apr 22 2015
  • Mathematica
    CoefficientList[Series[1/(1+x+x^2+x^3),{x,0,80}],x] (* or *) PadRight[{},120,{1,-1,0,0}]
    LinearRecurrence[{-1,-1,-1},{1,-1,0},80] (* Harvey P. Dale, May 22 2021 *)
  • PARI
    {a(n) = [1, -1, 0, 0][n%4 + 1]} /* Michael Somos, Dec 12 2012 */
    
  • PARI
    Vec(1/(1+x+x^2+x^3) + O(x^100)) \\ Michel Marcus, Jan 28 2016
    

Formula

G.f.: 1/(1 +x +x^2 +x^3).
Euler transform of length 4 sequence [ -1, 0, 0, 1]. - Michael Somos, Dec 12 2012
a(n) = a(n+4) = -a(1-n). |a(n)| = A133872(n). REVERT transform is A036765. INVERT transform is A077962. - Michael Somos, Dec 12 2012
A038505(n+2) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Dec 12 2012
From Wesley Ivan Hurt, Apr 22 2015: (Start)
a(n) +a(n-1) +a(n-2) +a(n-3) = 0.
a(n) = (-1)^n/2 +(-1)^(n/2 +1/4 -(-1)^n/4)/2. (End)