MathLabs

Problem 4

Prove that there is no function ff from the set of non-negative integers into itself such that f(f(n))=n+1987f(f(n)) = n + 1987 for every non-negative integer nn.
Step 4 of 5: The two pieces partition exactly 1987 elements
In plain words

The second iterate misses exactly the first 1987 nonnegative integers, and A and B divide those misses into alternating layers.

A∩B=∅,A∪B=N0∖f(f(N0))={0,1,…,1986}A\cap B=\varnothing,\qquad A\cup B=\mathbb N_0\setminus f(f(\mathbb N_0))=\{0,1,\ldots,1986\}
Detailed analysis

The sets AA and BB are disjoint: AA is outside f(N0)f(\mathbb N_0), whereas B⊆f(N0)B\subseteq f(\mathbb N_0). Their union is the complement of f(f(N0))f(f(\mathbb N_0)), because AA is the complement of f(N0)f(\mathbb N_0) and BB is the part of f(N0)f(\mathbb N_0) outside f(f(N0))f(f(\mathbb N_0)). The functional equation gives f(f(N0))={n+1987:n≥0}={1987,1988,…}f(f(\mathbb N_0))=\{n+1987:n\ge0\}=\{1987,1988,\ldots\}, so the union is {0,1,…,1986}\{0,1,\ldots,1986\}, of size 19871987.