Problem

Source: China South East Mathematicall Olympiad Grade 10 Prob.3

Tags: combinatorics



Given any integer $n\geq 3$. A finite series is called $n$-series if it satisfies the following two conditions $1)$ It has at least $3$ terms and each term of it belongs to $\{ 1,2,...,n\}$ $2)$ If series has $m$ terms $a_1,a_2,...,a_m$ then $(a_{k+1}-a_k)(a_{k+2}-a_k)<0$ for all $k=1,2,...,m-2$ How many $n$-series are there $?$