OFFSET
1,1
COMMENTS
FORMULA
T(n,k) = 3*2^(n-k-1)*binomial(n-1,k).
G.f.: (1 - (y - 1)*x)/(1 - (y + 2)*x). Generally for the number of length n words with k levels on an m-ary alphabet (m>1): (1 - (y - 1)*x)/(1 - (y + m - 1)*x). - Geoffrey Critzer, May 19 2014
EXAMPLE
T(3,1)=12 because we have 001,002,011,022,100,110,112,122,200,211,220 and 221.
Triangle starts:
3;
6, 3
12, 12, 3;
24, 36, 18, 3;
48, 96, 72, 24, 3;
MAPLE
T:=(n, k)->3*2^(n-k-1)*binomial(n-1, k): for n from 1 to 11 do seq(T(n, k), k=0..n-1) od; # yields sequence in triangular form
MATHEMATICA
sol=Solve[{a==v(z^2+a z), b==v(z^2+b z), c==v(z^2+c z)}, {a, b, c}]; f[z_, u_]:=1/(1-3z-a-b-c)/.sol/.v->u-1; nn=10; Drop[Map[Select[#, #>0&]&, Level[CoefficientList[Series[f[z, u], {z, 0, nn}], {z, u}], {2}]], 1]//Grid (* Geoffrey Critzer, May 19 2014 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Jul 15 2006
STATUS
approved