Olympiad Maths Prep

Track / Stage 9 / 15 of 80 #1895 of 2000

Problem 1895

IMO P2/P5; hard shortlist
Algebra Difficulty 9.1 Prove it 56th International Mathematical Olympiad Shortlisted Problems · IMO

Let Z>0\mathbb{Z}_{>0} denote the set of positive integers. Consider a function f:Z>0Z>0f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}_{>0}. For any m,nZ>0m, n \in \mathbb{Z}_{>0} we write fn(m)=f(f(fn(m)))f^{n}(m)=\underbrace{f(f(\ldots f}_{n}(m) \ldots)). Suppose that ff has the following two properties:
(i) If m,nZ>0m, n \in \mathbb{Z}_{>0}, then fn(m)mnZ>0\frac{f^{n}(m)-m}{n} \in \mathbb{Z}_{>0};
(ii) The set Z>0\{f(n)nZ>0}\mathbb{Z}_{>0} \backslash\left\{f(n) \mid n \in \mathbb{Z}_{>0}\right\} is finite.
Prove that the sequence f(1)1,f(2)2,f(3)3,f(1)-1, f(2)-2, f(3)-3, \ldots is periodic.

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

We split the solution into three steps. In the first of them, we show that the function ff is injective and explain how this leads to a useful visualization of ff. Then comes the second step, in which most of the work happens: its goal is to show that for any nZ>0n \in \mathbb{Z}_{>0} the sequence n,f(n),f2(n),n, f(n), f^{2}(n), \ldots is an arithmetic progression. Finally, in the third step we put everything together, thus solving the problem.

Step 1. We commence by checking that ff is injective. For this purpose, we consider any m,kZ>0m, k \in \mathbb{Z}_{>0} with f(m)=f(k)f(m)=f(k). By (i), every positive integer nn has the property that
kmn=fn(m)mnfn(k)kn \frac{k-m}{n}=\frac{f^{n}(m)-m}{n}-\frac{f^{n}(k)-k}{n}
is a difference of two integers and thus integral as well. But for n=km+1n=|k-m|+1 this is only possible if k=mk=m. Thereby, the injectivity of ff is established.

Now recall that due to condition (ii) there are finitely many positive integers a1,,aka_{1}, \ldots, a_{k} such that Z>0\mathbb{Z}_{>0} is the disjoint union of {a1,,ak}\left\{a_{1}, \ldots, a_{k}\right\} and {f(n)nZ>0}\left\{f(n) \mid n \in \mathbb{Z}_{>0}\right\}. Notice that by plugging n=1n=1 into condition (i) we get f(m)>mf(m)>m for all mZ>0m \in \mathbb{Z}_{>0}.

We contend that every positive integer nn may be expressed uniquely in the form n=fj(ai)n=f^{j}\left(a_{i}\right) for some j0j \geqslant 0 and i{1,,k}i \in\{1, \ldots, k\}. The uniqueness follows from the injectivity of ff. The existence can be proved by induction on nn in the following way. If n{a1,,ak}n \in\left\{a_{1}, \ldots, a_{k}\right\}, then we may take j=0j=0; otherwise there is some n<nn' < n with f(n)=nf\left(n'\right)=n to which the induction hypothesis may be applied.

The result of the previous paragraph means that every positive integer appears exactly once in the following infinite picture, henceforth referred to as "the Table":

| a1a_{1} | f(a1)f\left(a_{1}\right) | f2(a1)f^{2}\left(a_{1}\right) | f3(a1)f^{3}\left(a_{1}\right) | \ldots |
| :---: | :---: | :---: | :---: | :---: |
| a2a_{2} | f(a2)f\left(a_{2}\right) | f2(a2)f^{2}\left(a_{2}\right) | f3(a2)f^{3}\left(a_{2}\right) | \ldots |
| \vdots | \vdots | \vdots | \vdots | |
| aka_{k} | f(ak)f\left(a_{k}\right) | f2(ak)f^{2}\left(a_{k}\right) | f3(ak)f^{3}\left(a_{k}\right) | \ldots |

The Table

Step 2. Our next goal is to prove that each row of the Table is an arithmetic progression. Assume contrariwise that the number tt of rows which are arithmetic progressions would satisfy 0t<k0 \leqslant t < k. By permuting the rows if necessary we may suppose that precisely the first tt rows are arithmetic progressions, say with steps T1,,TtT_{1}, \ldots, T_{t}. Our plan is to find a further row that is "not too sparse" in an asymptotic sense, and then to prove that such a row has to be an arithmetic progression as well.

Let us write T=lcm(T1,T2,,Tt)T=\operatorname{lcm}\left(T_{1}, T_{2}, \ldots, T_{t}\right) and A=max{a1,a2,,at}A=\max \left\{a_{1}, a_{2}, \ldots, a_{t}\right\} if t>0t>0; and T=1T=1 and A=0A=0 if t=0t=0. For every integer nAn \geqslant A, the interval Δn=[n+1,n+T]\Delta_{n}=[n+1, n+T] contains exactly T/TiT / T_{i} elements of the ithi^{\text{th}} row (1it)(1 \leqslant i \leqslant t). Therefore, the number of elements from the last (kt)(k-t) rows of the Table contained in Δn\Delta_{n} does not depend on nAn \geqslant A. It is not possible that none of these intervals Δn\Delta_{n} contains an element from the ktk-t last rows, because infinitely many numbers appear in these rows. It follows that for each nAn \geqslant A the interval Δn\Delta_{n} contains at least one member from these rows.

This yields that for every positive integer dd, the interval [A+1,A+(d+1)(kt)T][A+1, A+(d+1)(k-t) T] contains at least (d+1)(kt)(d+1)(k-t) elements from the last ktk-t rows; therefore, there exists an index xx with t+1xkt+1 \leqslant x \leqslant k, possibly depending on dd, such that our interval contains at least d+1d+1 elements from the xthx^{\text{th}} row. In this situation we have
fd(ax)A+(d+1)(kt)T f^{d}\left(a_{x}\right) \leqslant A+(d+1)(k-t) T
Finally, since there are finitely many possibilities for xx, there exists an index xt+1x \geqslant t+1 such that the set
X={dZ>0fd(ax)A+(d+1)(kt)T} X=\left\{d \in \mathbb{Z}_{>0} \mid f^{d}\left(a_{x}\right) \leqslant A+(d+1)(k-t) T\right\}
is infinite. Thereby we have found the "dense row" promised above.

By assumption (i), for every dXd \in X the number
βd=fd(ax)axd \beta_{d}=\frac{f^{d}\left(a_{x}\right)-a_{x}}{d}
is a positive integer not exceeding
A+(d+1)(kt)TdAd+2d(kt)Td=A+2(kt)T \frac{A+(d+1)(k-t) T}{d} \leqslant \frac{A d+2 d(k-t) T}{d}=A+2(k-t) T
This leaves us with finitely many choices for βd\beta_{d}, which means that there exists a number TxT_{x} such that the set
Y={dXβd=Tx} Y=\left\{d \in X \mid \beta_{d}=T_{x}\right\}
is infinite. Notice that we have fd(ax)=ax+dTxf^{d}\left(a_{x}\right)=a_{x}+d \cdot T_{x} for all dYd \in Y.

Now we are prepared to prove that the numbers in the xthx^{\text{th}} row form an arithmetic progression, thus coming to a contradiction with our assumption. Let us fix any positive integer jj. Since the set YY is infinite, we can choose a number yYy \in Y such that yj>fj(ax)(ax+jTx)y-j>\left|f^{j}\left(a_{x}\right)-\left(a_{x}+j T_{x}\right)\right|. Notice that both numbers
fy(ax)fj(ax)=fyj(fj(ax))fj(ax) and fy(ax)(ax+jTx)=(yj)Tx f^{y}\left(a_{x}\right)-f^{j}\left(a_{x}\right)=f^{y-j}\left(f^{j}\left(a_{x}\right)\right)-f^{j}\left(a_{x}\right) \quad \text{ and } \quad f^{y}\left(a_{x}\right)-\left(a_{x}+j T_{x}\right)=(y-j) T_{x}
are divisible by yjy-j. Thus, the difference between these numbers is also divisible by yjy-j. Since the absolute value of this difference is less than yjy-j, it has to vanish, so we get fj(ax)=ax+jTxf^{j}\left(a_{x}\right)= a_{x}+j \cdot T_{x}.

Hence, it is indeed true that all rows of the Table are arithmetic progressions.

Step 3. Keeping the above notation in force, we denote the step of the ithi^{\text{th}} row of the table by TiT_{i}. **Now we claim that we have f(n)n=f(n+T)(n+T)f(n)-n=f(n+T)-(n+T) for all nZ>0n \in \mathbb{Z}_{>0}, where**
T=lcm(T1,,Tk) T=\operatorname{lcm}\left(T_{1}, \ldots, T_{k}\right)
To see this, let any nZ>0n \in \mathbb{Z}_{>0} be given and denote the index of the row in which it appears in the Table by ii. Then we have fj(n)=n+jTif^{j}(n)=n+j \cdot T_{i} for all jZ>0j \in \mathbb{Z}_{>0}, and thus indeed
f(n+T)f(n)=f1+T/Ti(n)f(n)=(n+T+Ti)(n+Ti)=T. f(n+T)-f(n)=f^{1+T / T_{i}}(n)-f(n)=\left(n+T+T_{i}\right)-\left(n+T_{i}\right)=T .
This concludes the solution.

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