A265584 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.
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, 7, 0, 42, 492, 864, 580, 210, 49, 8, 0, 68, 1344, 3276, 2800, 1230, 336, 64, 9, 0, 110, 3672, 12420, 13520, 7200, 2310, 504, 81, 10, 0, 178, 10032, 47088, 65280, 42150, 15876, 3976, 720, 100, 11
Offset: 1
Examples
1 2 3 4 5 6 7 8 1 4 9 16 25 36 49 64 0 6 24 60 120 210 336 504 0 10 66 228 580 1230 2310 3976 0 16 180 864 2800 7200 15876 31360 0 26 492 3276 13520 42150 109116 247352 0 42 1344 12420 65280 246750 749952 1950984 0 68 3672 47088 315200 1444500 5154408 15388352 T(3,2) =6 counts the 3-letter words aab, aba, abb, bba, bab, baa. The words aaa and bbb are not counted.
Crossrefs
Programs
-
Maple
A265584 := proc(n,k) (1+x+x^2)/(1-(k-1)*x-(k-1)*x^2) ; coeftayl(%,x=0,n) ; end proc: seq(seq( A265584(d-k,k),k=1..d-1),d=2..13) ;
-
Mathematica
T[n_, k_] := SeriesCoefficient[(1+x+x^2)/(1-(k-1)*x-(k-1)*x^2), {x, 0, n}]; Table[T[n-k, k], {n, 2, 12}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Mar 26 2020, from Maple *)
Formula
T(4,k) = k*(k-1)*(k^2+k-1).
T(5,k) = k^2*(k+2)*(k-1)^2.
T(6,k) = k*(k^3+2*k^2-k-1)*(k-1)^2.
T(7,k) = k*(k+1)*(k^2+2*k-1)*(k-1)^3.
Comments