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.

A120400 Expansion of 1/(1-x-x^2-x^6).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 14, 23, 39, 65, 109, 182, 305, 510, 854, 1429, 2392, 4003, 6700, 11213, 18767, 31409, 52568, 87980, 147248, 246441, 412456, 690306, 1155330, 1933616, 3236194, 5416251, 9064901, 15171458, 25391689, 42496763, 71124646, 119037660
Offset: 0

Views

Author

Jon E. Schoenfield, Aug 27 2006

Keywords

Comments

Number of compositions of n into parts 1, 2, and 6. - Joerg Arndt, Sep 30 2012
Counts partitions of n into parts (1,2,3,4,5) where only the position (order) of the 4's and 5's are important. - David Neil McGrath, May 12 2015

Examples

			Compositions of n into parts (1,2,6). a(6)=14 These are (6),(222),(2211),(1122),(1221),(2112),(2121),(1212),(21111),(12111),(11211),(11121),(11112),(111111). - _David Neil McGrath_, May 12 2015
Partial Partitions of n into parts (1,2,3,4,5) with only the position of 4's,5's important. a(8)=39; these are (53),(35),(521,512=one),(215,125=one),(251),(152),(5111),(1511),(1151),(1115),(44),(431,413=one),(314,134=one),(341),(143),(422),(224),(242),(4211,4121,4112=one),(2114,1214,1124=one),(2411),(1142),(2141,1241=one),(1421,1412=one),(41111),(14111),(11411),(11141),(11114),(332),(3311),(3221),(32111),(311111),(2222),(22211),(221111),(2111111),(11111111). - _David Neil McGrath_, May 12 2015
		

Programs

  • Magma
    [n le 6 select Fibonacci(n) else Self(n-1)+Self(n-2)+Self(n-6): n in [1..40]]; // Vincenzo Librandi, May 12 2015
    
  • Mathematica
    CoefficientList[Series[1/(1-x-x^2-x^6),{x,0,40}],x] (* or *) LinearRecurrence[{1,1,0,0,0,1},{1,1,2,3,5,8},40] (* Harvey P. Dale, Jun 19 2012 *)
  • Sage
    m = 40; L. = PowerSeriesRing(ZZ, m)
    f = 1/(1-x-x^2-x^6); print(f.coefficients())
    # Bruno Berselli, May 12 2015

Formula

G.f.: 1/(1-x-x^2-x^6).
a(n) = a(n-1) + a(n-2) + a(n-6).