login
Number of compositions of n into parts 3,4 where both parts are always present.
5

%I #26 Dec 22 2023 09:39:22

%S 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,

%T 79,92,112,144,171,204,257,316,375,462,573,692,838,1035,1265,1532,

%U 1873,2300,2798,3406,4173,5099,6204,7580,9273,11303,13784,16855,20576

%N Number of compositions of n into parts 3,4 where both parts are always present.

%H Vincenzo Librandi, <a href="/A245487/b245487.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (-1, -1, 1, 3, 3, 2, -1, -2, -2, -1).

%F 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.

%F 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

%e a(16)=5, the compositions being 43333, 34333, 33433, 33343, 33334.

%t 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 *)

%o (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

%Y Cf. A245332.

%K nonn,easy

%O 0,8

%A _David Neil McGrath_, Jul 23 2014

%E More terms from _Colin Barker_, Jul 24 2014