<s>
In	O
mathematics	O
(	O
and	O
particularly	O
in	O
combinatorics	O
)	O
,	O
the	O
major	B-Algorithm
index	I-Algorithm
of	O
a	O
permutation	B-Algorithm
is	O
the	O
sum	O
of	O
the	O
positions	O
of	O
the	O
descents	O
of	O
the	O
permutation	B-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
if	O
w	O
is	O
given	O
in	O
one-line	O
notation	O
by	O
w	O
=	O
351624	O
(	O
that	O
is	O
,	O
w	O
is	O
the	O
permutation	B-Algorithm
of	O
{	O
1	O
,	O
2	O
,	O
3	O
,	O
4	O
,	O
5	O
,	O
6}	O
such	O
that	O
w(1 )	O
=	O
3	O
,	O
w(2 )	O
=	O
5	O
,	O
etc	O
.	O
)	O
</s>
<s>
This	O
statistic	O
is	O
named	O
after	O
Major	O
Percy	O
Alexander	O
MacMahon	O
who	O
showed	O
in	O
1913	O
that	O
the	O
distribution	O
of	O
the	O
major	B-Algorithm
index	I-Algorithm
on	O
all	O
permutations	B-Algorithm
of	O
a	O
fixed	O
length	O
is	O
the	O
same	O
as	O
the	O
distribution	O
of	O
inversions	O
.	O
</s>
<s>
That	O
is	O
,	O
the	O
number	O
of	O
permutations	B-Algorithm
of	O
length	O
n	O
with	O
k	O
inversions	O
is	O
the	O
same	O
as	O
the	O
number	O
of	O
permutations	B-Algorithm
of	O
length	O
n	O
with	O
major	B-Algorithm
index	I-Algorithm
equal	O
to	O
k	O
.	O
(	O
These	O
numbers	O
are	O
known	O
as	O
Mahonian	O
numbers	O
,	O
also	O
in	O
honor	O
of	O
MacMahon	O
.	O
)	O
</s>
<s>
In	O
fact	O
,	O
a	O
stronger	O
result	O
is	O
true	O
:	O
the	O
number	O
of	O
permutations	B-Algorithm
of	O
length	O
n	O
with	O
major	B-Algorithm
index	I-Algorithm
k	O
and	O
i	O
inversions	O
is	O
the	O
same	O
as	O
the	O
number	O
of	O
permutations	B-Algorithm
of	O
length	O
n	O
with	O
major	B-Algorithm
index	I-Algorithm
i	O
and	O
k	O
inversions	O
,	O
that	O
is	O
,	O
the	O
two	O
statistics	O
are	O
equidistributed	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
number	O
of	O
permutations	B-Algorithm
of	O
length	O
4	O
with	O
given	O
major	B-Algorithm
index	I-Algorithm
and	O
number	O
of	O
inversions	O
is	O
given	O
in	O
the	O
table	O
below	O
.	O
</s>
