Major index

Tags: #definition

Major index

This is a statistic on permutations. Given some wSn, define

maj(w)=i descenti

the sum of the indices of all the descents.

This is a Mahonian statistic

Examples

w=2,5,7,3,1,6,8,4
maj(w)=3+4+7=14