login
Triangle read by rows: T(n,k) is the number of compositions of n into k parts when parts 1 and 2 are of two kinds.
1

%I #6 Jun 12 2013 10:52:07

%S 2,2,4,1,8,8,1,8,24,16,1,8,36,64,32,1,9,44,128,160,64,1,10,54,192,400,

%T 384,128,1,11,66,264,720,1152,896,256,1,12,79,352,1120,2432,3136,2048,

%U 512,1,13,93,456,1632,4272,7616,8192,4608,1024,1,14,108,576,2280,6816

%N Triangle read by rows: T(n,k) is the number of compositions of n into k parts when parts 1 and 2 are of two kinds.

%F G.f.=tz(2-z^2)/(1-z-2tz+tz^3). T(n, k)=T(n-1, k)+2T(n-1, k-1)-T(n-3, k-1).

%e T(4,2)=8 because we have (1,3),(1',3),(3,1),(3,1'),(2,2),(2,2'),(2',2) and (2',2').

%e Triangle begins:

%e 2;

%e 2,4;

%e 1,8,8;

%e 1,8,24,16;

%e 1,8,36,64,32;

%p G:=t*z*(2-z^2)/(1-z-2*t*z+t*z^3): Gser:=simplify(series(G,z=0,14)): for n from 1 to 12 do P[n]:=expand(coeff(Gser,z^n)) od: for n from 1 to 12 do seq(coeff(P[n],t^k),k=1..n) od; # yields sequence in triangular form

%t t[1, 1] = t[2, 1] = 2; t[3, 2] = 8; t[_, 1] = 1; t[n_, n_] := 2^n; t[n_, k_] /; 1 <= k <= n := t[n, k] = t[n-1, k] + 2*t[n-1, k-1] - t[n-3, k-1]; t[n_, k_] = 0; Table[t[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Jun 12 2013 *)

%Y Row sums yield A052536.

%K nonn,tabl

%O 1,1

%A _Emeric Deutsch_, Apr 10 2005