(a) Let us write each term of the sequence as a fraction reduced to lowest terms, xn=qnpn, and consider a new sequence yn=max{pn,qn}. We want to prove that the sequence yn is weakly decreasing, that is, that yn+1≤yn for every n≥0. This implies point (a), since it follows that pn,qn≤yn≤y0, and there is only a finite quantity of distinct terms belonging to the sequence xn, because there is only a finite number of rational numbers with numerator and denominator bounded by y0. To prove the inequality yn+1≤yn we distinguish two cases:
- if pn is even, then xn+1=qn∣pn/2−qn∣; we observe that this latter fraction is reduced to lowest terms, because GCD(pn/2−qn,qn)=GCD(pn/2,qn)=1, since pn/qn is reduced to lowest terms. We also note that if a,b are two positive numbers we have ∣a−b∣≤max{a,b}. It follows that yn+1=max{∣pn/2−qn∣,qn}≤max{pn/2,qn}≤max{pn,qn}=yn.
- if pn is odd, xn+1=pn∣qn−pn∣. As before the fraction is reduced to lowest terms, and we have yn+1=max{∣qn−pn∣,pn}≤max{pn,qn}=yn.
(b) We observe that, since the sequence xn 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/3 cannot both exist. If the value 0 appears first, for instance xk=0, then xk+1=1,xk+2=0, and so on, so the value 2/3 cannot appear. Similarly, if the value 2/3 appears first, for instance xm=2/3, then xm+1=2/3,xm+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/3 must appear. To this end suppose that 0 does not appear, and let us show that then 2/3 must appear. Let us first observe that, if 0 does not appear, then 1 does not appear either (if xn=1 then xn+1=0).
Since these are positive integers, the inequality yn+1≤yn can be a strict inequality only in a finite number of cases, since infinitely many cases of strict inequality would make the value of yn drop below zero. Examining the various cases, we have
(1) pn>qn and pn even: then yn=pn while yn+1=max{∣pn/2−qn∣,qn}<pn=yn;
(2) pn<qn and pn odd: then yn=qn while yn+1=max{qn−pn,pn}<qn=yn;
(3) pn>qn and pn odd;
(4) pn<qn and pn 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 n sufficiently large, we can therefore restrict ourselves to cases (3) and (4).
Suppose we are in case (3). Then xn+1=pn∣qn−pn∣=pnpn−qn<1, so we cannot again be in case (3), and hence xn+1 falls into case (4).
Suppose now we are in case (4). Then, xn+1=qn∣pn/2−qn∣=qnqn−pn/2<1, so xn+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 n0 be an integer such that, for every n≥n0, we fall into case (4) and the sequence is periodic. In particular, there exists an index k>0 such that xn0+k=xn0. From the equation xn+1=qn∣pn/2−qn∣=qnqn−pn/2 it is easy to prove, for example by induction, that pn0+k=3⋅2k−12k−(−1)kqn0+2k(−1)kpn0. Finally, knowing that pn0+k=pn0, we obtain the equation
3⋅2k−12k−(−1)kqn0+2k(−1)kpn0=pn0⇒3⋅2k−12k−(−1)kqn0=pn0(2k2k−(−1)k)⇒qn0pn0=32,
as desired.