%0 Journal Article %T Statistics on permutations %A Toufik Mansour %A Yidong Sun %J Online Journal of Analytic Combinatorics %D 2010 %I University of Auckland %X Let $pi = pi_1 pi_2 dots pi_n$ be any permutation of length $n,$ we say a descent $pi_i pi_{i+1}$ is a lower, middle, upper if there exists $j > i+1$ such that $pi_jpi_{i+1},pi_i$, respectively. Similarly, we say a rise $pi_ipi_{i+1}$ is a lower, middle, upper if there exists $j > i+1$ such that $pi_j, respectively. In this paper we give an explicit formula for the generating function for the number of permutations of length $n$ according to number of upper, middle, lower rises, and upper, middle, lower descents. This allows us to recover several known results in the combinatorics of permutation patterns as well as many new results. For example, we give an explicit formula for the generating function for the number of permutations of length $n$ having exactly $m$ middle descents. %U http://analytic-combinatorics.org/index.php/ojac/article/view/66