OFFSET
0,7
COMMENTS
Number of compositions of n into parts 3, 4, 5, 6 and 7 - David Neil McGrath, Aug 17 2014
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Vladimir Kruchinin and V. D. Kruchinin, Composita and their properties, arXiv:1103.2582 [math.CO], 2011-2013.
Index entries for linear recurrences with constant coefficients, signature (0,0,1,1,1,1,1).
FORMULA
a(n) = sum(sum(C(k,r)*sum(C(r,m)*sum(C(m,j)*C(j,n-m-3*k-j-r), j=0..m), m=0..r), r=0..k), k=1..n), n>0. - Vladimir Kruchinin, Aug 30 2010
a(0)=1, a(1)=0, a(2)=0, a(3)=1, a(4)=1, a(5)=1, a(6)=2; for n>6, a(n) = a(n-3)+a(n-4)+ a(n-5)+a(n-6)+a(n-7). - Harvey P. Dale, May 11 2012
MATHEMATICA
CoefficientList[Series[1/(1 - x^3 - x^4 - x^5 - x^6 - x^7), {x, 0, 50}], x] (* or *) LinearRecurrence[{0, 0, 1, 1 , 1, 1, 1}, {1, 0, 0, 1, 1, 1, 2}, 50] (* Harvey P. Dale, May 11 2012 *)
CoefficientList[Series[1 / (1 - Total[x^Range[3, 7]]), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 27 2013 *)
PROG
(Maxima) a(n):=sum(sum(binomial(k, r) *sum(binomial(r, m)*sum(binomial(m, j) *binomial(j, n-m-3*k-j-r), j, 0, m), m, 0, r), r, 0, k), k, 1, n); /* Vladimir Kruchinin, Aug 30 2010 */
(PARI) Vec(1/(1-x^3-x^4-x^5-x^6-x^7)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
(Magma) I:=[1, 0, 0, 1, 1, 1, 2]; [n le 7 select I[n] else Self(n-3)+Self(n-4) +Self(n-5)+Self(n-6)+Self(n-7): n in [1..50]]; // Vincenzo Librandi, Jun 27 2013
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-x^3-x^4-x^5-x^6-x^7))); // Vincenzo Librandi, Jun 27 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
