

A129529


Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2} that have k inversions (n >= 0, k >= 0).


1



1, 3, 6, 3, 10, 8, 8, 1, 15, 15, 21, 18, 9, 3, 21, 24, 39, 45, 48, 30, 24, 9, 3, 28, 35, 62, 82, 107, 108, 101, 81, 62, 37, 17, 8, 1, 36, 48, 90, 129, 186, 222, 264, 252, 255, 219, 183, 126, 90, 48, 27, 9, 3, 45, 63, 123, 186, 285, 372, 492, 561, 624, 648, 651, 597, 537, 435
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

Row n has 1 + floor(n^2/3) terms.
Row sums are equal to 3^n = A000244(n).
Alternating row sums are 3^(ceiling(n/2)) = A108411(n+1).
T(n,0) = (n+1)*(n+2)/2 = A000217(n+1).
Sum_{k>=0} k*T(n,k) = 3^(n1)*n*(n1)/2 = A129530(n).
This sequence is mentioned in the AndrewsSavageWilf paper.  Omar E. Pol, Jan 30 2012


REFERENCES

M. Bona, Combinatorics of Permutations, Chapman & Hall/CRC, Boca Raton, FL, 2004, pp. 5761.
G. E. Andrews, The Theory of Partitions, AddisonWesley, 1976.


LINKS



FORMULA

Generating polynomial of row n is Sum_{i=0..n} Sum_{j=0..ni} binomial[n; i,j,nij], where binomial[n;a,b,c] (a+b+c=n) is a qmultinomial coefficient.


EXAMPLE

T(3,2)=8 because we have 100, 110, 120, 200, 201, 211, 220 and 221.
Triangle starts:
1;
3;
6, 3;
10, 8, 8, 1;
15, 15, 21, 18, 9, 3;
21, 24, 39, 45, 48, 30, 24, 9, 3;


MAPLE

for n from 0 to 40 do br[n]:=sum(q^i, i=0..n1) od: for n from 0 to 40 do f[n]:=simplify(product(br[j], j=1..n)) od: mbr:=(n, a, b, c)>simplify(f[n]/f[a]/f[b]/f[c]): for n from 0 to 9 do G[n]:=sort(simplify(sum(sum(mbr(n, a, b, nab), b=0..na), a=0..n))) od: for n from 0 to 9 do seq(coeff(G[n], q, j), j=0..floor(n^2/3)) od; # yields sequence in triangular form


CROSSREFS



KEYWORD

nonn,tabf


AUTHOR



STATUS

approved



