login
Array T(n,k) counting words with n letters drawn from a k-letter alphabet with no letter appearing thrice in a 3-letter subword.
8

%I #17 Mar 26 2020 07:06:14

%S 1,1,2,0,4,3,0,6,9,4,0,10,24,16,5,0,16,66,60,25,6,0,26,180,228,120,36,

%T 7,0,42,492,864,580,210,49,8,0,68,1344,3276,2800,1230,336,64,9,0,110,

%U 3672,12420,13520,7200,2310,504,81,10,0,178,10032,47088,65280,42150,15876,3976,720,100,11

%N Array T(n,k) counting words with n letters drawn from a k-letter alphabet with no letter appearing thrice in a 3-letter subword.

%C The antidiagonal sums are s(d) = 1, 3, 7, 19, 55, 173, 597, 2245, 9127, 39827, 185411, 916177, 4784217,.. at index d=n+k >=2.

%F T(4,k) = k*(k-1)*(k^2+k-1).

%F T(5,k) = k^2*(k+2)*(k-1)^2.

%F T(6,k) = k*(k^3+2*k^2-k-1)*(k-1)^2.

%F T(7,k) = k*(k+1)*(k^2+2*k-1)*(k-1)^3.

%e 1 2 3 4 5 6 7 8

%e 1 4 9 16 25 36 49 64

%e 0 6 24 60 120 210 336 504

%e 0 10 66 228 580 1230 2310 3976

%e 0 16 180 864 2800 7200 15876 31360

%e 0 26 492 3276 13520 42150 109116 247352

%e 0 42 1344 12420 65280 246750 749952 1950984

%e 0 68 3672 47088 315200 1444500 5154408 15388352

%e T(3,2) =6 counts the 3-letter words aab, aba, abb, bba, bab, baa. The words aaa and bbb are not counted.

%p A265584 := proc(n,k)

%p (1+x+x^2)/(1-(k-1)*x-(k-1)*x^2) ;

%p coeftayl(%,x=0,n) ;

%p end proc:

%p seq(seq( A265584(d-k,k),k=1..d-1),d=2..13) ;

%t T[n_, k_] := SeriesCoefficient[(1+x+x^2)/(1-(k-1)*x-(k-1)*x^2), {x, 0, n}];

%t Table[T[n-k, k], {n, 2, 12}, {k, 1, n-1}] // Flatten (* _Jean-François Alcover_, Mar 26 2020, from Maple *)

%Y Cf. A265583 (no letter twice), A265624. A000290 (row 2), A007531 (row 3), A006355 (column 2), A121907 (column 3), A123620 (column 4), A123871 (column 5), A123887 (column 6).

%K nonn,tabl,easy

%O 1,3

%A _R. J. Mathar_, Dec 10 2015