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.

A078027 Expansion of (1 - x)/(1 - x^2 - x^3).

Original entry on oeis.org

1, -1, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, 465, 616, 816, 1081, 1432, 1897, 2513, 3329, 4410, 5842, 7739, 10252, 13581, 17991, 23833, 31572, 41824, 55405, 73396, 97229, 128801, 170625, 226030, 299426
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

The following are basically all variants of the same sequence: A000931, A078027, A096231, A124745, A133034, A134816, A164001, A182097, A228361 and probably A020720. However, each one has its own special features and deserves its own entry.

Programs

  • GAP
    a:=[1,-1,1];; for n in [4..60] do a[n]:=a[n-2]+a[n-3]; od; a; # G. C. Greubel, Aug 04 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1-x)/(1-x^2-x^3) )); // G. C. Greubel, Aug 04 2019
    
  • Maple
    seq(coeff(series((1-x)/(1-x^2-x^3), x, n+1), x, n), n = 0..60); # G. C. Greubel, Aug 04 2019
  • Mathematica
    CoefficientList[Series[(1-x)/(1-x^2-x^3), {x,0,60}], x] (* G. C. Greubel, Aug 04 2019 *)
    LinearRecurrence[{0,1,1},{1,-1,1},60] (* Harvey P. Dale, Jun 20 2020 *)
  • PARI
    Vec((1-x)/(1-x^2-x^3)+O(x^60)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • Sage
    ((1-x)/(1-x^2-x^3)).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Aug 04 2019
    

Formula

a(n) is asymptotic to r^(n-2) / (2*r+3) where r = 1.3247179572447..., the real root of x^3 = x + 1. For n >= 4, a(n) = a(n-2) + a(n-3). - Philippe Deléham, Jan 13 2004
a(n) = A182097(n) - A182097(n-1). - R. J. Mathar, Jan 27 2018