A245527 Number of compositions of n into parts 4 and 5 with at least one 4 and one 5.
0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 3, 0, 0, 4, 6, 4, 0, 5, 10, 10, 5, 6, 15, 20, 15, 13, 21, 35, 35, 29, 35, 56, 70, 65, 64, 92, 126, 136, 129, 156, 219, 263, 265, 285, 375, 484, 528, 550, 660, 860, 1013, 1078, 1210, 1521, 1873, 2092, 2288, 2732, 3394
Offset: 0
Examples
a(22)=10 The tuples are (55444)(54544)(54454)... where a(22)=5!/3!2!=10.
Links
- Index entries for linear recurrences with constant coefficients, signature (-1, -1, -1, 1, 3, 3, 3, 2, -1, -2, -2, -2, -1).
Programs
-
Mathematica
CoefficientList[Series[1 + 1/(1 - x^5 - x^4) - 1/(1 - x^5) - 1/(1 - x^4), {x, 0, 60}], x] (* Wesley Ivan Hurt, Jul 26 2014 *)
Formula
a(n) = a(n-4)+a(n-5)+b(n) where b(n) is the 20-cycle (1,0,0,1,0,1,0,1,0,0,1,1,0,0,0,2,0,0,0,1) and b(n)=b(n-20). Initial values are b(14)=1, a(9)=2, a(10)=0, a(11)=0, a(12)=0, a(13)=3.
G.f.: 1+1/(1-x^5-x^4)-1/(1-x^5)-1/(1-x^4) (see comment A245332). - courtesy of Joerg Arndt