Permutations of numbers with difference 1 that are lesser than h How many are the permutations of $n$ numbers where the first and last number are $1$, the difference between the numbers is $1$ and the numbers are lesser than h?
For example, for $n = 5$ and $h = 6$ $(h > 4)$ the permutations are $9$:
$ 1-2-3-2-1 $
$ 1-2-2-2-1 $
$ 1-2-2-1-1 $
$ 1-1-2-2-1 $
$ 1-2-1-2-1 $
$ 1-2-1-1-1 $
$ 1-1-2-1-1 $
$ 1-1-1-2-1 $
$ 1-1-1-1-1 $

These "permutations" are related to Motzkin paths. Compare this picture with your example.

