IMO 1987 · Problem 4

Prove that there is no function \(f\) from the set of non-negative integers into itself such that \(f(f(n)) = n + 1987\) for every \(n\).

Official text of the problem. Official problem paper (PDF)

Solution

Suppose such a function exists, and write \(\mathbb N_0=\{0,1,2,\ldots\}\).

First, \(f\) is injective: if \(f(a)=f(b)\), then applying \(f\) gives \[ a+1987=f(f(a))=f(f(b))=b+1987, \] so \(a=b\).

Let \(I=f(\mathbb N_0)\) be the image of \(f\), and let \(A=\mathbb N_0\setminus I\). The given identity implies \[ f(I)=\{1987,1988,1989,\ldots\}. \] Since \(f(I)\subseteq I\), the set \(A\) is contained in \(\{0,1,\ldots,1986\}\), and hence is finite.

We claim that \[ I\setminus f(I)=f(A). \] Indeed, every element of \(I\) has the form \(f(a)\), and injectivity shows that \[ f(a)\in f(I)\quad\Longleftrightarrow\quad a\in I. \] Thus \(f(a)\) belongs to \(I\setminus f(I)\) exactly when \(a\in A\), proving the claim.

Consequently, \(\mathbb N_0\setminus f(I)\) is the disjoint union of \(A\) and \(f(A)\). Since \(f\) is injective, these two finite sets have the same cardinality. Therefore \[ 1987 =\bigl|\mathbb N_0\setminus f(I)\bigr| =|A|+|f(A)| =2|A|. \] This contradicts the fact that \(1987\) is odd. Hence no such function exists. \(\square\)

The solution was checked against John Scholes' IMO solution archive (Kalva).