Consider all of the permutation of (1,2,3...n)
Each will have some number of local maxima, m.
For example if n=6 some permutations are
Define f(n,m) as the number of permutations of (1,2,3...n) with m local maxima.
What may be ultimately sought is a formula for f(n,m) but here are some simpler considerations to prove:
Find a formula for f(n,2) in terms of values where m=1
Find a formula relating f(2a,a) and f(2a+1,2a).
Note: The problem of finding f(n,1) was investigated
How many ways can four points be arranged in a plane so that the six distances between pairs of points take on only two different values?