Count permutations with exactly n inversions | Turing