I am looking at words $\alpha\_1 \ldots \alpha\_n$, where $\alpha\_j \in \{ 1, \ldots, j \}$. Thinking of $\alpha\_j$ as a height, these words can be interpreted as left-to-right paths on the positive square lattice which stay under the diagonal. They can also be thought as a Lehmer code for permutations. Obviously, there are $n!$ such words.


Assign to each word $w$ the number $\text{maj}(w)$ equal to the sum of indices $j$ such that $\alpha\_j > \alpha\_{j+1}$. This is the *major index* of $w$. Unlike the major index on the set of permutations, the major index on the set of paths does not produce a symmetric distribution.



> 
> Do you know any references that discuss this (or any other statistic) **on paths**?
> 
> 
> 



Statistics on Lehmer codes
The papers <http://www4.ncsu.edu/~savage/PAPERS/ESofLHPandEPforIS.pdf> and <http://www4.ncsu.edu/~savage/PAPERS/rational.pdf> contain some information about statistics on generalizations of Lehmer codes called **$s$**-*inversion sequences*.


