Problem

Source: Romanian TST 2000

Tags: function, algebra proposed, algebra



Let $n\ge 2$ be a positive integer. Find the number of functions $f:\{1,2,\ldots ,n\}\rightarrow\{1,2,3,4,5 \}$ which have the following property: $|f(k+1)-f(k)|\ge 3$, for any $k=1,2,\ldots n-1$. Vasile Pop