What
A pair of positions of a permutation such that and .
Distribution
The number of permutations of length with inversions is the same as the number of permutations of length with major index equal to .
Calculation
Can be calculated using dynamic programming. See: LeetCode 629