OFFSET
0,6
FORMULA
T(n, k) = Sum_{j=0..n-2k} (-1)^(n-j)*2^(3k-n+j-1)*binomial(3k+j, 3k)*binomial(k-1, n-2k-j) for k > 0.
G.f.: Sum_{n>=0} Sum_{k=0..floor(n/2)} T(n, k)*x^n*y^k = ((1-x)^2-x^2*y)/((1-x)^3-x^2(2-x)*y).
EXAMPLE
For n = 4 and k = 2, the T(4,2) = 2 permutations are 2143 and 3142.
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 4;
1, 10, 2;
1, 20, 13;
1, 35, 49, 4;
1, 56, 140, 36;
1, 84, 336, 181, 8;
1, 120, 714, 670, 92;
1, 165, 1386, 2035, 578, 16;
MATHEMATICA
T[n_, k_] :=
If[k == 0, 1,
Sum[(-1)^(n - j)*2^(3 k - n + j - 1)*Binomial[j + 3 k, 3 k]*
Binomial[k - 1, n - 2 k - j], {j, 0, n - 2 k}]];
Flatten[Table[Table[T[n, k], {k, 0, Floor[n/2]}], {n, 0, 14}]]
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Colin Defant, May 12 2018
STATUS
approved