OFFSET
1,3
REFERENCES
R. P. Stanley, Enumerative Combinatorics, Vol. 2, Cambridge Univ. Press, Cambridge, 1999, pp. 241, 275.
LINKS
Emeric Deutsch and Warren P. Johnson, Create your own permutation statistics, Math. Mag., 77, 130-134, 2004.
J. West, Sorting twice through a stack, Conference on Formal Power Series and Algebraic Combinatorics (Bordeaux, 1991). Theoret. Comput. Sci. 117 (1993), no. 1-2, 303-313.
FORMULA
T(n, k) = 6*(4*k+3)*n!*binomial(3*k-1, k-3)/((2*k+3)*(k+2)!) for k<n; T(n, n)=2*(3*n)!/((2*n+1)!*(n+1)!).
EXAMPLE
T(4,3)=2 because 2341 and 3241 are the only permutations of [4] which are not 2-stack sortable but their initial segments of length 3 (i.e. 234 and 324) are 2-stack sortable.
Triangle begins:
1;
0, 2;
0, 0, 6;
0, 0, 2, 22;
0, 0, 10, 19, 91;
0, 0, 60, 114, 138, 408;
...
MAPLE
T:=proc(n, k) if k<n then 6*(4*k+3)*n!*binomial(3*k-1, k-3)/(2*k+3)/(k+2)! elif k=n then 2*(3*n)!/(2*n+1)!/(n+1)! else 0 fi end: seq(seq(T(n, k), k=1..n), n=1..12);
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch and Warren P. Johnson, Jun 10 2004
STATUS
approved