Maths Olympiad Prep

Library / /2 of 2

Algebra Difficulty 7.6 National Olympiad, round 2 Prove it Taiwan

Let Z0Z_{\ge 0} be the set of all nonnegative integers. Find all the functions f:Z0Z0f: Z_{\ge 0} \to Z_{\ge 0} satisfying the relation
f(f(f(n)))=f(n+1)+1 for all nZ0. f(f(f(n))) = f(n + 1) + 1 \text{ for all } n \in Z_{\ge 0}.

Solution

There are two such functions: f(n)=n+1f(n) = n + 1 for all nZ0n \in Z_{\ge 0}, and
f(n)={n+1,n0(mod4) or n2(mod4),n+5,n1(mod4),n3,n3(mod4),for all nZ0. f(n) = \begin{cases} n+1, & n \equiv 0 \pmod 4 \text{ or } n \equiv 2 \pmod 4, \\ n+5, & n \equiv 1 \pmod 4, \\ n-3, & n \equiv 3 \pmod 4, \end{cases} \quad \text{for all } n \in Z_{\ge 0}.
Throughout all the solutions, we write hk(x)h^k(x) to abbreviate the kkth iteration of function hh, so h0h^0 is the identity function, and hk(x)=h(h(x))h^k(x) = h(\dots h(x)\dots) for k1k \ge 1.

To start, we get from ()(*) that
f4(n)=f(f3(n))=f(f(n+1)+1) and f4(n+1)=f3(f(n+1))=f(f(n+1)+1)+1, f^{4}(n) = f(f^{3}(n)) = f(f(n+1)+1) \text{ and } f^{4}(n+1) = f^{3}(f(n+1)) = f(f(n+1)+1)+1,
thus
f4(n)+1=f4(n+1)(2) f^{4}(n) + 1 = f^{4}(n+1) \qquad (2)

I. Let us denote by RiR_i the range of fif^i; note that R0=Z0R_0 = Z_{\ge 0} since f0f^0 is the identity function. Obviously, R0R1R_0 \supseteq R_1 \supseteq \dots. Next, from (2) we get that if aR4a \in R_4 then also a+1R4a+1 \in R_4. This implies that Z0R4Z_{\ge 0} \setminus R_4 -- and hence Z0R1Z_{\ge 0} \setminus R_1 -- is finite. In particular, R1R_1 is unbounded.

Assume that f(m)=f(n)f(m) = f(n) for some distinct mm and nn. Then from ()(*) we obtain f(m+1)=f(n+1)f(m+1) = f(n+1); by an easy induction we then get that f(m+c)=f(n+c)f(m+c) = f(n+c) for every c0c \ge 0. So the function f(k)f(k) is periodic with mn|m-n| for kmk \ge m, and thus R1R_1 should be bounded, which is false. So ff is injective.

II. Denote now Si=Ri1RiS_i = R_{i-1} \setminus R_i; all these sets are finite for i4i \le 4. On the other hand, by the injectivity we have nSif(n)Si+1n \in S_i \Leftrightarrow f(n) \in S_{i+1}. By the injectivity again, ff implements a bijection between SiS_i and Si+1S_{i+1}, thus S1=|S_1| = \dots; denote this common cardinality by kk. If 0R30 \in R_3 then 0=f(f(f(n)))0 = f(f(f(n))) for some nn, thus from ()(*) we get f(n+1)=1f(n+1) = -1 which is impossible. Therefore 0R0R3=S1S2S30 \in R_0 \setminus R_3 = S_1 \cup S_2 \cup S_3, thus k1k \ge 1.

Next, let us describe the elements bb of R0R3=S1S2S3R_0 \setminus R_3 = S_1 \cup S_2 \cup S_3. We claim that each such element satisfies at least one of three conditions (i) b=0b = 0, (ii) b=f(0)+1b = f(0) + 1, and (iii) b1S1b - 1 \in S_1. Otherwise b1Z0b - 1 \in Z_{\ge 0}, and there exists some n>0n > 0 such that f(n)=b1f(n) = b - 1; but then f3(n1)=f(n)+1=bf^3(n - 1) = f(n) + 1 = b, so bR3b \in R_3.

This yields
3k=S1S2S31+1+S1=k+2, 3k = |S_1 \cup S_2 \cup S_3| \le 1 + 1 + |S_1| = k + 2,
or k1k \le 1. Therefore k=1k = 1, and the inequality above comes to equality. So we have S1={a}S_1 = \{a\}, S2={f(a)}S_2 = \{f(a)\}, and S3={f2(a)}S_3 = \{f^2(a)\} for some aZ0a \in Z_{\ge 0}, and each one of the three options (i), (ii) and (iii) should be realized exactly once, which means that
{a,f(a),f2(a)}={0,a+1,f(0)+1}.(3) \{a, f(a), f^2(a)\} = \{0, a+1, f(0)+1\}. \qquad (3)

III. From (3), we get a+1{f(a),f2(a)}a + 1 \in \{f(a), f^2(a)\} (the case a+1=aa + 1 = a is impossible). If a+1=f2(a)a + 1 = f^2(a) then we have f(a+1)=f3(a)=f(a+1)+1f(a + 1) = f^3(a) = f(a + 1) + 1 which is absurd. Therefore
f(a)=a+1.(4) f(a) = a + 1. \qquad (4)

Next, again from (3) we have 0{a,f2(a)}0 \in \{a, f^2(a)\}. Let us consider these two cases separately.

Case 1. Assume that a=0a = 0, then f(0)=f(a)=a+1=1f(0) = f(a) = a + 1 = 1. Also from (3) we get f(1)=f2(a)=f(0)+1=2f(1) = f^2(a) = f(0) + 1 = 2. Now, let us show that f(n)=n+1f(n) = n + 1 by induction on nn; the base cases n1n \le 1 are established. Next, if n2n \ge 2 then the induction hypothesis implies
n+1=f(n1)+1=f3(n2)=f2(n1)=f(n), n + 1 = f(n - 1) + 1 = f^3(n - 2) = f^2(n - 1) = f(n),
establishing the step. In this case we have obtained the first of two answers; checking that it satisfies ()(*) is straightforward.

Case 2. Assume now that f2(a)=0f^2(a) = 0; then by (3) we get a=f(0)+1a = f(0)+1. By (4) we get f(a)=a+1f(a) = a + 1, then f(0)=f3(a)=f(a+1)+1=1f(0) = f^3(a) = f(a+1) + 1 = 1, hence a=f(0)+1=2a = f(0) + 1 = 2 and f(2)=3f(2) = 3 by (4). To summarize,
f(0)=1,f(2)=3,f(3)=0. f(0) = 1, \quad f(2) = 3, \quad f(3) = 0.
Now let us prove by induction on mm that (1) holds for all n=4k,4k+2,4k+3n = 4k, 4k+2, 4k+3 with kmk \le m and for all n=4k+1n = 4k+1 with k<mk < m. The base case m=0m = 0 is established above. For the step, assume that m1m \ge 1. From ()(*) we get f3(4m3)=f(4m2)+1=4mf^3(4m-3) = f(4m-2)+1 = 4m. Next, by (2) we have
f(4m)=f4(4m3)=f4(4m4)+1=f3(4m3)+1=4m+1. f(4m) = f^4(4m - 3) = f^4(4m - 4) + 1 = f^3(4m - 3) + 1 = 4m + 1.
Then by the induction hypothesis together with ()(*) we successively obtain
f(4m3)=f3(4m1)=f(4m)+1=4m+2,f(4m+2)=f3(4m4)=f(4m3)+1=4m+3,f(4m+3)=f3(4m3)=f(4m2)+1=4m, \begin{align*} f(4m - 3) &= f^3(4m - 1) = f(4m) + 1 = 4m + 2, \\ f(4m + 2) &= f^3(4m - 4) = f(4m - 3) + 1 = 4m + 3, \\ f(4m + 3) &= f^3(4m - 3) = f(4m - 2) + 1 = 4m, \end{align*}
thus finishing the induction step.

Finally, it is straightforward to check that the constructed function works:
f3(4k)=4k+7=f(4k+1)+1,f3(4k+1)=4k+4=f(4k+2)+1, f^{3}(4k) = 4k + 7 = f(4k + 1) + 1, \quad f^{3}(4k + 1) = 4k + 4 = f(4k + 2) + 1,
f3(4k+2)=4k+1=f(4k+3)+1,f3(4k+3)=4k+6=f(4k+4)+1. f^{3}(4k + 2) = 4k + 1 = f(4k + 3) + 1, \quad f^{3}(4k + 3) = 4k + 6 = f(4k + 4) + 1.

Want a route through all this instead of 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 translated into English from zh; metadata (topic, difficulty) added by this project.