OFFSET
0,7
COMMENTS
Number of compositions of n into parts 3, 4, 5, and 6. - David Neil McGrath, Aug 17 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,1,1,1,1).
FORMULA
a(n) = a(n-6) + a(n-5) + a(n-4) + a(n-3). - Jon E. Schoenfield, Aug 07 2006
a(n) = a(n-1) + a(n-4) + {1, -1, or 0} depending on whether n mod 3 is {0, 1, or 2}. - Barry Cipra, Mar 03 2008
MATHEMATICA
CoefficientList[Series[1 / (1 - Total[x^Range[3, 6]]), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 27 2013 *)
LinearRecurrence[{0, 0, 1, 1, 1, 1}, {1, 0, 0, 1, 1, 1}, 50] (* Harvey P. Dale, Aug 15 2014 *)
PROG
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-x^3-x^4-x^5-x^6)))); /* or */ I:=[1, 0, 0, 1, 1, 1]; [n le 6 select I[n] else Self(n-3)+Self(n-4)+Self(n-5)+Self(n-6): n in [1..50]]; // Vincenzo Librandi, Jun 27 2013
(PARI) Vec(1/(1-x^3-x^4-x^5-x^6)+ O(x^60)) \\ Michel Marcus, Aug 17 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved