Suppose $\sigma=(a_1,a_2,a_3...,a_n)$ be a permutation of $(1,2,3,...n)$. A pair $(a_i,a_j)$ is said to correspond to an inversion of $\sigma$, if $i<j$ but $a_i > a_j$. How many permutations of $(1,2,3...n)$, $(n\geq 3)$, have exactly $2$ inversions?
Example: In the permutation $(2,4,5,3,1)$, there are 6 inversions corresponding to the pairs $(2,1),(4,3), (4,1), (5,3), (5,1), (3,1)$.
Can anyone give a recursive proof for this one? I tried to get one, but I dont get a proper solution..