The number of permutations with k inversions
Let $n\geq 1$, $0\leq t\leq {n \choose 2}$ be arbitrary integers. Define the numbers $I_n(t)$ as the number of permutations of $[n]$ with $t$ inversions. Let $n,d\geq 1$ and $0\leq t\leq (d-1)n$ be arbitrary integers. Define {\em the polynomial coefficients} $H(n,d,t)$ as the numbers of compositions of $t$ with at most $n$ parts, no one of which is greater than $d-1$. In our article we give explicit formulas for the numbers $I_n(t)$ and $H(n,d,t)$ using the theory of Gr\"obner bases and free resolutions.