OFFSET
0,9
REFERENCES
R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see Corollary 1.3.10, p. 21.
FORMULA
T(n, k)=sum_{j=0..n}[T(n-1, k-j)].
Product (1+x+...+x^k), k=1..n-1 = Sum T(n, k)x^k, k=0..n(n-1)/2.
EXAMPLE
1;
0,1;
0,1,1;
0,0,2,1;
0,0,2,3,1;
0,0,1,5,4,1;
0,0,0,6,9,5,1; ...
[1, 4, 2, 3], [1, 3, 4, 2], [2, 1, 4, 3], [2, 3, 1, 4], [3, 1, 2, 4] have 2 inversions so T(4, 2)=5.
PROG
(PARI) T(n, k)=polcoeff(prod(j=1, n-1, sum(i=0, j, x^i)), k)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Henry Bottomley, Apr 25 2001
EXTENSIONS
Additional comments from Michael Somos, Jun 23 2002.
STATUS
approved