MahonianNumber
The number of permutations of with exactly inversions — entry of row of the Mahonian triangle.
Wikipedia
PermutationPermutationMathWorldPermutationWikidataQ161519Encyclopedia of MathematicsPermutationnLabpermutationBritannicatopic/permutationOEISA008302MahonianNumber(n, k)the coefficient of in the -factorial Combinatorica
NumberOfPermutationsByInversions[n, k]Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer, integer) -> integer | combinatorics | always |
Details
- Equals , and the number of permutations with .
- Satisfies and the symmetry . It is for .
- Defined in Epsil as that recurrence over a table of rows; a bigint kernel answers, exactly, and
tests/mahonian.test.tsholds the two together. - Combinatorica's
NumberOfPermutationsByInversions; the same convention, with counted from . A negative or is left unevaluated, as compute-engine's Eulerian does (Combinatorica leaves a negative unevaluated too). The kernel also declines, rather than block, past about three million cell updates (about 0.2 s). - Not a core Wolfram head: there is no
MahonianNumberin Wolfram 15 or the Function Repository.
Plot
Examples
2 more kept as data, checked against the oraclesAbout
| Examples | 7 |
|---|---|
| Checked against | Combinatorica 6 agree |
| Crosswalk | Wikipedia ×2MathWorldWikidataEncyclopedia of MathematicsnLabBritannicaOEISCombinatorica |
Implementation
mapped
combinatoricapackages/oracle/src/mappings.tsCombinatorica calls the Mahonian numbers NumberOfPermutationsByInversions.
See also: Inversions, KInversionPermutations, Eulerian, MajorIndex