Olympiad Maths Prep

Track / Stage 6 / 74 of 400 #1074 of 2000

Problem 1074

National olympiad, first round
Number theory Difficulty 6.1 Prove it

## I1\mathrm{I}-1 A

Find all surjective functions f:NNf: \mathbb{N} \rightarrow \mathbb{N} such that for all positive integers aa and bb, exactly one of the following equations is true:

f(a)=f(b)f(a+b)=min{f(a),f(b)} \begin{aligned} f(a) & =f(b) \\ f(a+b) & =\min \{f(a), f(b)\} \end{aligned}

Remarks: N\mathbb{N} denotes the set of all positive integers. A function f:XYf: X \rightarrow Y is said to be surjective if for every yYy \in Y there exists xXx \in X such that f(x)=yf(x)=y.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Solution 1. Each positive integer can be uniquely written as n=2kln=2^{k} l where k0k \geqslant 0 and ll is odd. We will show that the only function satisfying the conditions is f(2kl)=k+1f\left(2^{k} l\right)=k+1 for all k0k \geqslant 0 and all odd ll.

Assume that f(1)1f(1) \neq 1. Since ff is surjective, there exists aNa \in \mathbb{N} such that f(a)=1f(a)=1. Since f(1)1=f(a)f(1) \neq 1=f(a), we get f(a+1)=min{f(a),f(1)}=1f(a+1)=\min \{f(a), f(1)\}=1, and inductively we get f(n)=1f(n)=1 for each nan \geqslant a. However, this contradicts the surjectivity of ff.

Therefore f(1)=1f(1)=1. Then f(2)min{f(1),f(1)}=1f(2) \neq \min \{f(1), f(1)\}=1, and f(3)=min{f(1),f(2)}=1f(3)=\min \{f(1), f(2)\}=1. Now it easily follows by induction that f(n)=1f(n)=1 if nn is odd and f(n)>1f(n)>1 if nn is even.

We will show by induction on kk that f(2kl)=k+1f\left(2^{k} l\right)=k+1 for all odd ll and f(2km)>k+1f\left(2^{k} m\right)>k+1 for all even mm. The basis of induction has been proved above. Assume that the statement holds for all k1k1 if nn is even, as we have shown above. Therefore f(2k0l)=k0+1f\left(2^{k_{0}} l\right)=k_{0}+1 for odd ll and f(2k0 m)>k0+1f\left(2^{k_{0}} \mathrm{~m}\right)>k_{0}+1 for even mm, which completes the induction. It is easy to check that this function indeed satisfies the conditions of the problem.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.