Olympiad Maths Prep

Library / /18 of 21

, 2007

Number theory Difficulty 8.9 Shortlist Prove it IMO

Find all surjective functions f:NNf: \mathbb{N} \rightarrow \mathbb{N} such that for every m,nNm, 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:NNf: \mathbb{N} \rightarrow \mathbb{N} satisfies the problem conditions.

Lemma. For any prime pp and any x,yNx, y \in \mathbb{N}, we have xy(modp)x \equiv y (\bmod p) if and only if f(x)f(y)(modp)f(x) \equiv f(y) (\bmod p). Moreover, pf(x)p \mid f(x) if and only if pxp \mid x.

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

Suppose that there exists an xNx \in \mathbb{N} such that dxd \nmid x but pf(x)p \mid f(x). Let
y=min{xN:dx,pf(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 ydy-d is a positive integer not divisible by dd. Then pf(yd)p \nmid f(y-d), while pf(d)p \mid f(d) and pf(d+(yd))=f(y)p \mid f(d + (y-d)) = f(y). This contradicts the problem condition. Hence, there is no such xx, and
pf(x)dx. \begin{equation*} p \mid f(x) \Longleftrightarrow d \mid x. \tag{1} \end{equation*}
Take arbitrary x,yNx, y \in \mathbb{N} such that xy(modd)x \equiv y (\bmod d). We have pf(x+(2xdx))=f(2xd)p \mid f(x + (2xd - x)) = f(2xd); moreover, since d2xd+(yx)=y+(2xdx)d \mid 2xd + (y-x) = y + (2xd - x), we get pf(y+(2xdx))p \mid f(y + (2xd - x)). Then by the problem condition pf(x)+f(2xdx)p \mid f(x) + f(2xd - x), pf(y)+f(2xdx)p \mid f(y) + f(2xd - x), and hence f(x)f(2xdx)f(y)(modp)f(x) \equiv -f(2xd - x) \equiv f(y) (\bmod p).

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

Thus, we have proved that
xy (modd)f(x)f(y) (modp). \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 pdp \geq d. On the other hand, by the surjectivity of ff, there exist x1,,xpNx_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, dpd \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, pf(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 qnq \mid n, so by the Lemma qkq \mid k and k>1k > 1.

If k>nk > n then kn+1>1k - n + 1 > 1, and there exists a prime pkn+1p \mid k - n + 1; we have kn1(modp)k \equiv n - 1 (\bmod p). By the induction hypothesis we have f(n1)=n1k=f(n)(modp)f(n-1) = n-1 \equiv k = f(n) (\bmod p). Now, by the Lemma we obtain n1n(modp)n-1 \equiv n (\bmod p) which cannot be true.

Analogously, if k<nk < n, then f(k1)=k1f(k-1) = k-1 by induction hypothesis. Moreover, nk+1>1n - k + 1 > 1, so there exists a prime pnk+1p \mid n - k + 1 and nk1(modp)n \equiv k - 1 (\bmod p). By the Lemma again, k=f(n)f(k1)=k1(modp)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.

Looking for a route rather than an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.