Problem come from The 2879 of Hoj . The problem is what is the numbers of permutations of {1,……n} whith k ascends ,increasing or discreasing .
Here the question is much easier ,while k is 2.The solution of this problem please go to here,a mathematics tournament of Harvard-Mit.
Next we will know something about the Eulerian numbers . As I say above , the Eulerian numbers are the numbers of permutations of the natural numbers that has exactly k ascends or descends ,take it just like A(n,k)
and A(0,0)=1,
A(n,k) = ( n - k ) *A(n-1,k-1) +(k+1)*A(n-1,k)
and we can find that the solution of the last problem is exactly the k=2;
for more information please goto here