Combinatorica`
Combinatorica`
NumberOfPermutationsByInversions
NumberOfPermutationsByInversions[n,k]
gives the number of permutations of length with exactly inversions.
NumberOfPermutationsByInversions[n]
gives a table of the number of length- permutations with inversions, for all .
Details and Options
- To use NumberOfPermutationsByInversions, you first need to load the Combinatorica Package using Needs["Combinatorica`"].