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.

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

Original entry on oeis.org

1, 1, 0, 0, 2, 4, 4, 4, 8, 16, 24, 32, 48, 80, 128, 192, 288, 448, 704, 1088, 1664, 2560, 3968, 6144, 9472, 14592, 22528, 34816, 53760, 82944, 128000, 197632, 305152, 471040, 727040, 1122304, 1732608, 2674688, 4128768, 6373376, 9838592, 15187968, 23445504, 36192256
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A077943.

Programs

  • GAP
    a:=[1,1,0];; for n in [4..50] do a[n]:=2*(a[n-1]-a[n-2]+a[n-3]); od; a; # G. C. Greubel, Jun 27 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/( 1-2*x+2*x^2-2*x^3) )); // G. C. Greubel, Jun 27 2019
    
  • Mathematica
    LinearRecurrence[{2,-2,2}, {1,1,0}, 50] (* or *) CoefficientList[
    Series[(1-x)/(1-2*x+2*x^2-2*x^3), {x,0,50}], x] (* G. C. Greubel, Jun 27 2019 *)
  • PARI
    Vec((1-x)/(1-2*x+2*x^2-2*x^3)+O(x^50)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    ((1-x)/(1-2*x+2*x^2-2*x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
    

Formula

a(n) = A077943(n) - A077943(n-1). - R. J. Mathar, Aug 04 2008