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.

A120415 Expansion of 1/(1-x-x^3-x^6).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 7, 11, 16, 25, 39, 59, 91, 141, 216, 332, 512, 787, 1210, 1863, 2866, 4408, 6783, 10436, 16054, 24700, 38002, 58464, 89947, 138385, 212903, 327550, 503937, 775304, 1192801, 1835123, 2823330, 4343681, 6682741, 10281375, 15817857, 24335721
Offset: 0

Views

Author

Jon E. Schoenfield, Aug 27 2006

Keywords

Comments

Number of compositions of n into parts 1, 3, and 6. [Joerg Arndt, Sep 03 2013]

Crossrefs

Cf. A157897.

Programs

  • Magma
    I:=[1,1,1,2,3,4]; [n le 6 select I[n] else Self(n-1)+Self(n-3)+Self(n-6): n in [1..40]]; // Vincenzo Librandi, Sep 03 2013
    
  • Mathematica
    CoefficientList[Series[1/(1-x-x^3-x^6), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 03 2013 *)
  • SageMath
    def A120415_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-x-x^3-x^6) ).list()
    A120415_list(40) # G. C. Greubel, Sep 02 2022

Formula

a(n) = a(n-1) + a(n-3) + a(n-6).
a(n) = Sum_{k=0..floor(n/2)} A157897(n-k, k). - G. C. Greubel, Sep 02 2022