Maths Olympiad Prep

Library / /22 of 24

Algebra Difficulty 7.1 National Olympiad, round 2 Prove it Italy

Let x0,x1,x2,x_{0}, x_{1}, x_{2}, \ldots be a sequence of rational numbers defined recursively as follows: x0x_{0} is any rational number, and, for n0n \geq 0,

xn+1={xn21 if the numerator of xn is even ,1xn1 if the numerator of xn is odd , x_{n+1}= \begin{cases}\left|\frac{x_{n}}{2}-1\right| & \text { if the numerator of } x_{n} \text { is even }, \\ \left|\frac{1}{x_{n}}-1\right| & \text { if the numerator of } x_{n} \text { is odd },\end{cases}

where by numerator of a rational number we mean that of the fraction reduced to lowest terms. Prove that for every value of x0x_{0}:
(a) the sequence contains only a finite number of terms distinct from each other;
(b) the sequence contains exactly one of the numbers 0 and 2/32 / 3 (that is: either there exists an index kk such that xk=0x_{k}=0, or there exists an index mm such that xm=2/3x_{m}=2 / 3, but not both).

Solution

(a) Let us write each term of the sequence as a fraction reduced to lowest terms, xn=pnqnx_{n}=\frac{p_{n}}{q_{n}}, and consider a new sequence yn=max{pn,qn}y_{n}=\max \left\{p_{n}, q_{n}\right\}. We want to prove that the sequence yny_{n} is weakly decreasing, that is, that yn+1yny_{n+1} \leq y_{n} for every n0n \geq 0. This implies point (a), since it follows that pn,qnyny0p_{n}, q_{n} \leq y_{n} \leq y_{0}, and there is only a finite quantity of distinct terms belonging to the sequence xnx_{n}, because there is only a finite number of rational numbers with numerator and denominator bounded by y0y_{0}. To prove the inequality yn+1yny_{n+1} \leq y_{n} we distinguish two cases:
- if pnp_{n} is even, then xn+1=pn/2qnqnx_{n+1}=\frac{\left|p_{n} / 2-q_{n}\right|}{q_{n}}; we observe that this latter fraction is reduced to lowest terms, because GCD(pn/2qn,qn)=GCD(pn/2,qn)=1\operatorname{GCD}\left(p_{n} / 2-q_{n}, q_{n}\right)=\operatorname{GCD}\left(p_{n} / 2, q_{n}\right)=1, since pn/qnp_{n} / q_{n} is reduced to lowest terms. We also note that if a,ba, b are two positive numbers we have abmax{a,b}|a-b| \leq \max \{a, b\}. It follows that yn+1=max{pn/2qn,qn}max{pn/2,qn}max{pn,qn}=yny_{n+1}=\max \left\{\left|p_{n} / 2-q_{n}\right|, q_{n}\right\} \leq \max \left\{p_{n} / 2, q_{n}\right\} \leq \max \left\{p_{n}, q_{n}\right\}=y_{n}.
- if pnp_{n} is odd, xn+1=qnpnpnx_{n+1}=\frac{\left|q_{n}-p_{n}\right|}{p_{n}}. As before the fraction is reduced to lowest terms, and we have yn+1=max{qnpn,pn}max{pn,qn}=yny_{n+1}=\max \left\{\left|q_{n}-p_{n}\right|, p_{n}\right\} \leq \max \left\{p_{n}, q_{n}\right\}=y_{n}.

(b) We observe that, since the sequence xnx_{n} contains only a finite number of distinct terms, at some point one of them will repeat, and the sequence will be periodic from that point onward.
Let us first prove that the values 0 and 2/32 / 3 cannot both exist. If the value 0 appears first, for instance xk=0x_{k}=0, then xk+1=1,xk+2=0x_{k+1}=1, x_{k+2}=0, and so on, so the value 2/32 / 3 cannot appear. Similarly, if the value 2/32 / 3 appears first, for instance xm=2/3x_{m}=2 / 3, then xm+1=2/3,xm+2=2/3x_{m+1}=2 / 3, x_{m+2}=2 / 3, and so on, so the value 0 cannot appear.
Let us now prove that at least one of the two terms 0 and 2/32 / 3 must appear. To this end suppose that 0 does not appear, and let us show that then 2/32 / 3 must appear. Let us first observe that, if 0 does not appear, then 1 does not appear either (if xn=1x_{n}=1 then xn+1=0x_{n+1}=0).
Since these are positive integers, the inequality yn+1yny_{n+1} \leq y_{n} can be a strict inequality only in a finite number of cases, since infinitely many cases of strict inequality would make the value of yny_{n} drop below zero. Examining the various cases, we have
(1) pn>qnp_{n}>q_{n} and pnp_{n} even: then yn=pny_{n}=p_{n} while yn+1=max{pn/2qn,qn}<pn=yny_{n+1}=\max \left\{\left|p_{n} / 2-q_{n}\right|, q_{n}\right\}<p_{n}=y_{n};
(2) pn<qnp_{n}<q_{n} and pnp_{n} odd: then yn=qny_{n}=q_{n} while yn+1=max{qnpn,pn}<qn=yny_{n+1}=\max \left\{q_{n}-p_{n}, p_{n}\right\}<q_{n}=y_{n};
(3) pn>qnp_{n}>q_{n} and pnp_{n} odd;
(4) pn<qnp_{n}<q_{n} and pnp_{n} even.
Cases (1) and (2) can occur only a finite number of times, because they present a strict inequality. Hence, from a certain point onward, only cases (3) and (4) can occur. Provided we consider nn sufficiently large, we can therefore restrict ourselves to cases (3) and (4).
Suppose we are in case (3). Then xn+1=qnpnpn=pnqnpn<1x_{n+1}=\frac{\left|q_{n}-p_{n}\right|}{p_{n}}=\frac{p_{n}-q_{n}}{p_{n}}<1, so we cannot again be in case (3), and hence xn+1x_{n+1} falls into case (4).
Suppose now we are in case (4). Then, xn+1=pn/2qnqn=qnpn/2qn<1x_{n+1}=\frac{\left|p_{n} / 2-q_{n}\right|}{q_{n}}=\frac{q_{n}-p_{n} / 2}{q_{n}}<1, so xn+1x_{n+1} again falls into case (4).
In conclusion, from a certain point onward we are always in case (4) and, as observed previously, the sequence is periodic. Let n0n_{0} be an integer such that, for every nn0n \geq n_{0}, we fall into case (4) and the sequence is periodic. In particular, there exists an index k>0k>0 such that xn0+k=xn0x_{n_{0}+k}=x_{n_{0}}. From the equation xn+1=pn/2qnqn=qnpn/2qnx_{n+1}=\frac{\left|p_{n} / 2-q_{n}\right|}{q_{n}}=\frac{q_{n}-p_{n} / 2}{q_{n}} it is easy to prove, for example by induction, that pn0+k=2k(1)k32k1qn0+(1)k2kpn0p_{n_{0}+k}=\frac{2^{k}-(-1)^{k}}{3 \cdot 2^{k-1}} q_{n_{0}}+\frac{(-1)^{k}}{2^{k}} p_{n_{0}}. Finally, knowing that pn0+k=pn0p_{n_{0}+k}=p_{n_{0}}, we obtain the equation
2k(1)k32k1qn0+(1)kpn02k=pn02k(1)k32k1qn0=pn0(2k(1)k2k)pn0qn0=23, \frac{2^{k}-(-1)^{k}}{3 \cdot 2^{k-1}} q_{n_{0}}+\frac{(-1)^{k} p_{n_{0}}}{2^{k}}=p_{n_{0}} \Rightarrow \frac{2^{k}-(-1)^{k}}{3 \cdot 2^{k-1}} q_{n_{0}}=p_{n_{0}}\left(\frac{2^{k}-(-1)^{k}}{2^{k}}\right) \Rightarrow \frac{p_{n_{0}}}{q_{n_{0}}}=\frac{2}{3},
as desired.

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 it; metadata (topic, difficulty) added by this project.