A245487 Number of compositions of n into parts 3,4 where both parts are always present.
0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 3, 0, 4, 6, 4, 5, 10, 10, 11, 15, 20, 22, 27, 35, 43, 49, 63, 79, 92, 112, 144, 171, 204, 257, 316, 375, 462, 573, 692, 838, 1035, 1265, 1532, 1873, 2300, 2798, 3406, 4173, 5099, 6204, 7580, 9273, 11303, 13784, 16855, 20576
Offset: 0
Examples
a(16)=5, the compositions being 43333, 34333, 33433, 33343, 33334.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-1, -1, 1, 3, 3, 2, -1, -2, -2, -1).
Crossrefs
Cf. A245332.
Programs
-
Mathematica
CoefficientList[Series[x^7 (x^3 + 2 x^2 + 2 x + 2)/((x - 1) (x + 1) (x^2 + 1) (x^2 + x + 1) * (x^4 + x^3 - 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Jul 25 2014 *)
-
PARI
a=[0,0,0,0,0,0,2,0,0,3]; b=[1,0,1,0,1,1,0,0,2,0,0,1]; k=1; for(n=11, 100, a=concat(a, a[n-3]+a[n-4]+b[k]); if(k==#b, k=1, k++)); a \\ Colin Barker, Jul 24 2014
Formula
a(n) = a(n-3)+a(n-4)+b(n) where b(n) is the 12-cycle (1,0,1,0,1,1,0,0,2,0,0,1) starting with initial value b(11)=1 and b(n)=b(n-12) e.g. b(23)=b(11). The initial values for a(n) are a(7)=2,a(8)=0,a(9)=0,a(10)=3.
G.f.: x^7*(x^3+2*x^2+2*x+2) / ((x-1)*(x+1)*(x^2+1)*(x^2+x+1)*(x^4+x^3-1)). - Colin Barker, Jul 24 2014
Extensions
More terms from Colin Barker, Jul 24 2014