OFFSET
0,4
COMMENTS
Also number of self-inverse permutations in S_n with longest increasing subsequence of length >= k. T(4,3) = 4: 1234, 1243, 1324, 2134; T(3,0) = T(3,1) = 4: 123, 132, 213, 321; T(5,3) = 16: 12345, 12354, 12435, 12543, 13245, 13254, 14325, 14523, 15342, 21345, 21354, 21435, 32145, 34125, 42315, 52341.
LINKS
Alois P. Heinz, Rows n = 0..50, flattened
Wikipedia, Involution (mathematics)
Wikipedia, Young tableau
EXAMPLE
T(4,3) = 4, there are 4 standard Young tableaux of 4 cells and height >= 3:
+---+ +------+ +------+ +------+
| 1 | | 1 2 | | 1 3 | | 1 4 |
| 2 | | 3 .--+ | 2 .--+ | 2 .--+
| 3 | | 4 | | 4 | | 3 |
| 4 | +---+ +---+ +---+
+---+
Triangle T(n,k) begins:
1;
1, 1;
2, 2, 1;
4, 4, 3, 1;
10, 10, 9, 4, 1;
26, 26, 25, 16, 5, 1;
76, 76, 75, 56, 25, 6, 1;
232, 232, 231, 197, 105, 36, 7, 1;
764, 764, 763, 694, 441, 176, 49, 8, 1;
...
MAPLE
h:= proc(l) local n; n:=nops(l); add(i, i=l)! /mul(mul(1+l[i]-j+
add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
end:
g:= proc(n, i, l) option remember;
`if`(n=0, h(l), `if`(i<1, 0, `if`(i=1, h([l[], 1$n]),
g(n, i-1, l) +`if`(i>n, 0, g(n-i, i, [l[], i])))))
end:
T:= (n, k)-> g(n, n, []) -`if`(k=0, 0, g(n, k-1, [])):
seq(seq(T(n, k), k=0..n), n=0..12);
MATHEMATICA
h[l_] := Module[{n = Length[l]}, Sum[i, {i, l}]! / Product[ Product[1 + l[[i]] - j + Sum [If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
g[n_, i_, l_] := g[n, i, l] = If[n == 0, h[l], If[i < 1, 0, If[i == 1, h[Join[l, Array[1&, n]]], g [n, i-1, l] + If[i > n, 0, g[n-i, i, Append[l, i]]]]]];
t[n_, k_] := g[n, n, {}] - If[k == 0, 0, g[n, k-1, {}]];
Table[Table[t[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 12 2013, translated from Maple *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Apr 19 2012
STATUS
approved