When defining the parity of a permutation $f\in S_n$, one can use the "inversion number," $i(f)$ defined as the number of pairs $(i,j)$ with $i
For example, the inversion number of $f=(1,3,5)(2,6)$ in $S_7$ is $i(f)=11$, corresponding to the pairs $(1,5),(1,6),(2,3),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6),(4,5),(4,6)$.
There is exactly one permutation in $S_n$ with $i(f)=0$, namely the identity, and one with largest possible value $i(f)=\displaystyle\binom n2$, namely $f(j)=n+1-j$, where all lines cross. In fact, for this $f$ and any $g$, $i( f\circ g)=\displaystyle\binom n2- i(g)$.
For $\displaystyle 0\le j\le\binom n2$ left $N(j)$ be the number of permutations $f$ in $S_n$ with $i(f)=j$. So $N(0)=N(\binom n2)=1$, and the last sentence from the previous paragraph shows that the graph of $N$ is symmetric about the line $j=\binom n2/2$.
I am looking for a proof that $N$ is unimodal (actually, strictly increasing up to $\lfloor \binom n2/2\rfloor$).
Also, any references on this subject would be appreciated.