Maths Olympiad Prep

Library / IMO Shortlist /290 of 365

IMO Shortlist, 2007

Number theory Difficulty 8.9 Shortlist Prove it IMO

Find all surjective functions f:N→Nf: \mathbb{N} \rightarrow \mathbb{N} such that for every m,n∈Nm, n \in \mathbb{N} and every prime pp, the number f(m+n)f(m+n) is divisible by pp if and only if f(m)+f(n)f(m)+f(n) is divisible by pp.

(N\mathbb{N} is the set of all positive integers.)

Solution

Suppose that function f:N→Nf: \mathbb{N} \rightarrow \mathbb{N} satisfies the problem conditions.

Lemma. For any prime pp and any x,y∈Nx, y \in \mathbb{N}, we have x≡y( mod p)x \equiv y (\bmod p) if and only if f(x)≡f(y)( mod p)f(x) \equiv f(y) (\bmod p). Moreover, p∣f(x)p \mid f(x) if and only if p∣xp \mid x.

Proof. Consider an arbitrary prime pp. Since ff is surjective, there exists some x∈Nx \in \mathbb{N} such that p∣f(x)p \mid f(x). Let
d=min⁡{x∈N:p∣f(x)} d = \min \{x \in \mathbb{N}: p \mid f(x)\}
By induction on kk, we obtain that p∣f(kd)p \mid f(kd) for all k∈Nk \in \mathbb{N}. The base is true since p∣f(d)p \mid f(d). Moreover, if p∣f(kd)p \mid f(kd) and p∣f(d)p \mid f(d) then, by the problem condition, p∣f(kd+d)=f((k+1)d)p \mid f(kd+d) = f((k+1)d) as required.

Suppose that there exists an x∈Nx \in \mathbb{N} such that d∤xd \nmid x but p∣f(x)p \mid f(x). Let
y=min⁡{x∈N:d∤x,p∣f(x)}. y = \min \{x \in \mathbb{N}: d \nmid x, p \mid f(x)\}.
By the choice of dd, we have y>dy > d, and y−dy-d is a positive integer not divisible by dd. Then p∤f(y−d)p \nmid f(y-d), while p∣f(d)p \mid f(d) and p∣f(d+(y−d))=f(y)p \mid f(d + (y-d)) = f(y). This contradicts the problem condition. Hence, there is no such xx, and
p∣f(x)⟺d∣x. \begin{equation*} p \mid f(x) \Longleftrightarrow d \mid x. \tag{1} \end{equation*}
Take arbitrary x,y∈Nx, y \in \mathbb{N} such that x≡y( mod d)x \equiv y (\bmod d). We have p∣f(x+(2xd−x))=f(2xd)p \mid f(x + (2xd - x)) = f(2xd); moreover, since d∣2xd+(y−x)=y+(2xd−x)d \mid 2xd + (y-x) = y + (2xd - x), we get p∣f(y+(2xd−x))p \mid f(y + (2xd - x)). Then by the problem condition p∣f(x)+f(2xd−x)p \mid f(x) + f(2xd - x), p∣f(y)+f(2xd−x)p \mid f(y) + f(2xd - x), and hence f(x)≡−f(2xd−x)≡f(y)( mod p)f(x) \equiv -f(2xd - x) \equiv f(y) (\bmod p).

On the other hand, assume that f(x)≡f(y)( mod p)f(x) \equiv f(y) (\bmod p). Again we have p∣f(x)+f(2xd−x)p \mid f(x) + f(2xd - x) which by our assumption implies that p∣f(x)+f(2xd−x)+(f(y)−f(x))=f(y)+f(2xd−x)p \mid f(x) + f(2xd - x) + (f(y) - f(x)) = f(y) + f(2xd - x). Hence by the problem condition p∣f(y+(2xd−x))p \mid f(y + (2xd - x)). Using (1) we get 0≡y+(2xd−x)≡y−x( mod d)0 \equiv y + (2xd - x) \equiv y - x (\bmod d).

Thus, we have proved that
x≡y ( mod d)⟺f(x)≡f(y) ( mod p). \begin{equation*} x \equiv y \ (\bmod d) \Longleftrightarrow f(x) \equiv f(y) \ (\bmod p). \tag{2} \end{equation*}
We are left to show that p=dp = d: in this case (1) and (2) provide the desired statements.

The numbers 1,2,…,d1, 2, \ldots, d have distinct residues modulo dd. By (2), numbers f(1),f(2),…,f(d)f(1), f(2), \ldots, f(d) have distinct residues modulo pp; hence there are at least dd distinct residues, and p≥dp \geq d. On the other hand, by the surjectivity of ff, there exist x1,…,xp∈Nx_1, \ldots, x_p \in \mathbb{N} such that f(xi)=if(x_i) = i for any i=1,2,…,pi = 1, 2, \ldots, p. By (2), all these xix_i's have distinct residues modulo dd. For the same reasons, d≥pd \geq p. Hence, d=pd = p.

Now we prove that f(n)=nf(n) = n by induction on nn. If n=1n = 1 then, by the Lemma, p∤f(1)p \nmid f(1) for any prime pp, so f(1)=1f(1) = 1, and the base is established. Suppose that n>1n > 1 and denote k=f(n)k = f(n). Note that there exists a prime q∣nq \mid n, so by the Lemma q∣kq \mid k and k>1k > 1.

If k>nk > n then k−n+1>1k - n + 1 > 1, and there exists a prime p∣k−n+1p \mid k - n + 1; we have k≡n−1( mod p)k \equiv n - 1 (\bmod p). By the induction hypothesis we have f(n−1)=n−1≡k=f(n)( mod p)f(n-1) = n-1 \equiv k = f(n) (\bmod p). Now, by the Lemma we obtain n−1≡n( mod p)n-1 \equiv n (\bmod p) which cannot be true.

Analogously, if k<nk < n, then f(k−1)=k−1f(k-1) = k-1 by induction hypothesis. Moreover, n−k+1>1n - k + 1 > 1, so there exists a prime p∣n−k+1p \mid n - k + 1 and n≡k−1( mod p)n \equiv k - 1 (\bmod p). By the Lemma again, k=f(n)≡f(k−1)=k−1( mod p)k = f(n) \equiv f(k-1) = k-1 (\bmod p), which is also false. The only remaining case is k=nk = n, so f(n)=nf(n) = n.

Finally, the function f(n)=nf(n) = n obviously satisfies the condition.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.