A120907 Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2} having sum of the lengths of the drops equal to k (n>=0, k>=0). The drops of a ternary word on {0,1,2} are the subwords 10,20 and 21, their lengths being the differences 1, 2 and 1, respectively.
1, 3, 6, 2, 1, 10, 10, 7, 15, 30, 31, 4, 1, 21, 70, 105, 36, 11, 28, 140, 294, 184, 76, 6, 1, 36, 252, 714, 696, 396, 78, 15, 45, 420, 1554, 2160, 1666, 566, 141, 8, 1, 55, 660, 3102, 5808, 5918, 2990, 995, 136, 19, 66, 990, 5775, 13992, 18348, 12746, 5615, 1280, 226
Offset: 0
Examples
T(4,3)=4 because we have 1020,2010,2021 and 2120. Triangle starts: 1; 3; 6,2,1; 10,10,7; 15,30,31,4,1; 21,70,105,36,11;
Programs
-
Maple
G:=1/(1-z+t*z)/(1-2*z+z^2-t*z-t*z^2): Gser:=simplify(series(G,z=0,15)): P[0]:=1: for n from 1 to 12 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 12 do seq(coeff(P[n],t,j),j=0..2*floor(n/2)) od; # yields sequence in triangular form
Formula
G.f.=G(t,z)=1/[(1-z+tz)(1-2z+z^2-tz-tz^2)].
Comments