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.

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

Original entry on oeis.org

1, -1, -1, 2, 1, -4, 0, 7, -3, -11, 10, 15, -24, -16, 49, 7, -89, 26, 145, -108, -208, 279, 245, -595, -174, 1119, -176, -1888, 1121, 2831, -3185, -3598, 7137, 3244, -13920, 295, 24301, -10971, -37926, 35567, 51256, -84464, -53615, 171287, 20407, -309366, 97265, 501060, -386224, -713161
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A077954.

Programs

  • GAP
    a:=[1,-1,-1];; for n in [4..50] do a[n]:=-a[n-1]-2*a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jun 25 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1+x+2*x^2+x^3) )); // G. C. Greubel, Jun 25 2019
    
  • Mathematica
    CoefficientList[Series[1/(1+x+2x^2+x^3),{x,0,50}],x] (* or *) LinearRecurrence[ {-1,-2,-1},{1,-1,-1},50] (* Harvey P. Dale, Apr 18 2016 *)
  • PARI
    my(x='x+O('x^50)); Vec(1/(1+x+2*x^2+x^3)) \\ G. C. Greubel, Jun 25 2019
    
  • Sage
    (1/(1+x+2*x^2+x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 25 2019
    

Formula

G.f.: 1 - x/(G(0) + x) where G(k)= 1 - x*(k+1)/(1 - 1/(1 + (k+1)/G(k+1)));(continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 17 2012
a(n) = (-1)^n*A077954(n). - R. J. Mathar, Jul 10 2013