IMC 1998 · Problem 4

Day 220 points5th IMC · Blagoevgrad, Bulgaria

Statement

Let An={1,2,,n}A_n = \{1, 2, \dots, n\}, where n3n \ge 3. Let F\mathcal{F} be the family of all non-constant functions f:AnAnf : A_n \to A_n satisfying the following conditions:

(1) f(k)f(k+1)f(k) \le f(k+1) for k=1,2,,n1k = 1, 2, \dots, n-1,

(2) f(k)=f(f(k+1))f(k) = f(f(k+1)) for k=1,2,,n1k = 1, 2, \dots, n-1.

Find the number of functions in F\mathcal{F}.

Official solution

Hidden so you can work on the problem first.