login
Triangle read by rows: T(n,k) is the number of ternary words of length n having k runs (i.e., subwords of maximal length) of identical letters (1 <= k <= n).
1

%I #13 Jul 22 2017 02:56:36

%S 3,3,6,3,12,12,3,18,36,24,3,24,72,96,48,3,30,120,240,240,96,3,36,180,

%T 480,720,576,192,3,42,252,840,1680,2016,1344,384,3,48,336,1344,3360,

%U 5376,5376,3072,768,3,54,432,2016,6048,12096,16128,13824,6912,1536,3,60

%N Triangle read by rows: T(n,k) is the number of ternary words of length n having k runs (i.e., subwords of maximal length) of identical letters (1 <= k <= n).

%C Row sums are the powers of 3 (A000244).

%F T(n,k) = 3*2^(k-1)*binomial(n-1,k-1).

%F G(t,z) = 3*t*z/(1-z-2*t*z).

%F T(n,k) = 3*A013609(n-1,k-1).

%F T(n,k) = A120910(n,n-k).

%F Sum_{k>=1} k*T(n,k) = 3*A081038(n-1).

%e T(3,2)=12 because we have 001,002,011,022,100,110,112,122,200,211,220 and 221.

%e Triangle starts:

%e 3;

%e 3, 6;

%e 3, 12, 12;

%e 3, 18, 36, 24;

%e 3, 24, 72, 96, 48;

%p T:=(n,k)->3*2^(k-1)*binomial(n-1,k-1): for n from 1 to 11 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form

%t nn=15;f[list_]:=Select[list,#>0&];a=y x/(1-x) +1;b=a^2/(1-(a-1)^2 );Drop[Map[f,CoefficientList[Series[b a/(1-(a-1)(b-1)),{x,0,nn}],{x,y}]],1]//Grid (* _Geoffrey Critzer_, Nov 20 2012 *)

%Y Cf. A000244, A013609, A120910.

%K nonn,tabl

%O 1,1

%A _Emeric Deutsch_, Jul 15 2006