OFFSET
0,3
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
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,0,0,0,1).
FORMULA
G.f.: 1/(1-x-x^2-x^6).
a(n) = a(n-1) + a(n-2) + a(n-6).
EXAMPLE
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
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 *)
PROG
(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
(Sage)
m = 40; L.<x> = PowerSeriesRing(ZZ, m)
f = 1/(1-x-x^2-x^6); print(f.coefficients())
# Bruno Berselli, May 12 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon E. Schoenfield, Aug 27 2006
STATUS
approved