Maths WorkshopMaths problems with full solutions
Exercise 2092Combinatorics › Binomial coefficientsM1Added 3 Nov 2026

Mahonian numbers

#Mahonian#inversion#binomial

Statement

State the relationship between the Mahonian numbers (number of permutations with kk inversions) and the Gaussian binomial coefficients.

Hint

The Gaussian binomial (nk)q\binom{n}{k}_q counts kk-subsets of an nn-set, weighted by qsum of elementsq^{\text{sum of elements}}.

Show solutionHide solution

Solution

Gaussian binomial. (nk)q=(qn−1)⋯(qn−k+1−1)(qk−1)⋯(q−1)\binom{n}{k}_q=\frac{(q^n-1)\cdots(q^{n-k+1}-1)}{(q^k-1)\cdots(q-1)}.

Mahonian numbers. The number of permutations of nn with kk inversions equals the coefficient of qkq^k in [n]q!=∏i=1nqi−1q−1[n]_q!=\prod_{i=1}^n\frac{q^i-1}{q-1}.

Connection. The Gaussian binomial (nk)q\binom{n}{k}_q is a refinement of the binomial coefficient, with qq-analogue identities.

Conclusion. Mahonian numbers are the coefficients of the qq-factorial, connected to Gaussian binomials via qq-analogues of binomial identities.