login
Number T(n,k) of length 3n words such that all letters of the k-ary alphabet occur at least once and are introduced in ascending order and which can be built by repeatedly inserting triples of identical letters into the initially empty word; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
15

%I #32 Oct 26 2018 14:59:18

%S 1,0,1,0,1,3,0,1,18,12,0,1,97,198,55,0,1,530,2520,1820,273,0,1,2973,

%T 29886,42228,15300,1428,0,1,17059,347907,859180,564585,122094,7752,0,

%U 1,99657,4048966,16482191,17493938,6577494,942172,43263

%N Number T(n,k) of length 3n words such that all letters of the k-ary alphabet occur at least once and are introduced in ascending order and which can be built by repeatedly inserting triples of identical letters into the initially empty word; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%H Alois P. Heinz, <a href="/A256311/b256311.txt">Rows n = 0..140, flattened</a>

%F T(n,k) = Sum_{i=0..k} (-1)^i * A213028(n,k-i) / (i!*(k-i)!).

%e T(0,0) = 1: (the empty word).

%e T(1,1) = 1: aaa.

%e T(2,1) = 1: aaaaaa.

%e T(2,2) = 3: aaabbb, aabbba, abbbaa.

%e T(3,1) = 1: aaaaaaaaa.

%e T(3,2) = 18: aaaaaabbb, aaaaabbba, aaaabbbaa, aaabaaabb, aaabbaaab, aaabbbaaa, aaabbbbbb, aabaaabba, aabbaaaba, aabbbaaaa, aabbbabbb, aabbbbbba, abaaabbaa, abbaaabaa, abbbaaaaa, abbbaabbb, abbbabbba, abbbbbbaa.

%e T(3,3) = 12: aaabbbccc, aaabbcccb, aaabcccbb, aabbbaccc, aabbbccca, aabbcccba, aabcccbba, abbbaaccc, abbbaccca, abbbcccaa, abbcccbaa, abcccbbaa.

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 1, 3;

%e 0, 1, 18, 12;

%e 0, 1, 97, 198, 55;

%e 0, 1, 530, 2520, 1820, 273;

%e 0, 1, 2973, 29886, 42228, 15300, 1428;

%e 0, 1, 17059, 347907, 859180, 564585, 122094, 7752;

%p A:= (n, k)-> `if`(n=0, 1,

%p k/n *add(binomial(3*n, j) *(n-j) *(k-1)^j, j=0..n-1)):

%p T:= (n, k)-> add((-1)^i*A(n, k-i)/(i!*(k-i)!), i=0..k):

%p seq(seq(T(n, k), k=0..n), n=0..10);

%Y Columns k=0-10 give: A000007, A057427, A321032, A321033, A321034, A321035, A321036, A321037, A321038, A321039, A321040.

%Y Row sums give A321031.

%Y Main diagonal gives A001764.

%Y T(2n,n) gives A321041.

%Y Cf. A256117, A213028.

%K nonn,tabl

%O 0,6

%A _Alois P. Heinz_, Mar 25 2015