Maths Olympiad Prep

Library / /28 of 48

Algebra Difficulty 7.6 National olympiad, round 2 Prove it Asia Pacific Mathematics Olympiad (APMO)

Let mm be a fixed positive integer. The infinite sequence {an}n1\{a_{n}\}_{n \geq 1} is defined in the following way: a1a_{1} is a positive integer, and for every integer n1n \geq 1 we have
an+1={an2+2m if an<2man/2 if an2m a_{n+1}= \begin{cases}a_{n}^{2}+2^{m} & \text{ if } a_{n}<2^{m} \\ a_{n} / 2 & \text{ if } a_{n} \geq 2^{m}\end{cases}
For each mm, determine all possible values of a1a_{1} such that every term in the sequence is an integer.

Solutions — 2

Solution 1

Suppose that for integers mm and a1a_{1} all the terms of the sequence are integers. For each i1i \geq 1, write the iith term of the sequence as ai=bi2cia_{i}=b_{i} 2^{c_{i}} where bib_{i} is the largest odd divisor of aia_{i} (the "odd part" of aia_{i}) and cic_{i} is a nonnegative integer.

Lemma 1. The sequence b1,b2,b_{1}, b_{2}, \ldots is bounded above by 2m2^{m}.

Proof. Suppose this is not the case and take an index ii for which bi>2mb_{i}>2^{m} and for which cic_{i} is minimal. Since aibi>2ma_{i} \geq b_{i}>2^{m}, we are in the second case of the recursion. Therefore, ai+1=ai/2a_{i+1}=a_{i} / 2 and thus bi+1=bi>2mb_{i+1}=b_{i}>2^{m} and ci+1=ci1<cic_{i+1}=c_{i}-1<c_{i}. This contradicts the minimality of cic_{i}.

Lemma 2. The sequence b1,b2,b_{1}, b_{2}, \ldots is nondecreasing.

Proof. If ai2ma_{i} \geq 2^{m}, then ai+1=ai/2a_{i+1}=a_{i} / 2 and thus bi+1=bib_{i+1}=b_{i}. On the other hand, if ai<2ma_{i}<2^{m}, then
ai+1=ai2+2m=bi222ci+2m a_{i+1}=a_{i}^{2}+2^{m}=b_{i}^{2} 2^{2 c_{i}}+2^{m}
and we have the following cases:
- If 2ci>m2 c_{i}>m, then ai+1=2m(bi222cim+1)a_{i+1}=2^{m}\left(b_{i}^{2} 2^{2 c_{i}-m}+1\right), so bi+1=bi222cim+1>bib_{i+1}=b_{i}^{2} 2^{2 c_{i}-m}+1>b_{i}.
- If 2ci<m2 c_{i}<m, then ai+1=22ci(bi2+2m2ci)a_{i+1}=2^{2 c_{i}}\left(b_{i}^{2}+2^{m-2 c_{i}}\right), so bi+1=bi2+2m2ci>bib_{i+1}=b_{i}^{2}+2^{m-2 c_{i}}>b_{i}.
- If 2ci=m2 c_{i}=m, then ai+1=2m+1bi2+12a_{i+1}=2^{m+1} \cdot \frac{b_{i}^{2}+1}{2}, so bi+1=(bi2+1)/2bib_{i+1}=\left(b_{i}^{2}+1\right) / 2 \geq b_{i} since bi2+12(mod4)b_{i}^{2}+1 \equiv 2(\bmod 4).

By combining these two lemmas we obtain that the sequence b1,b2,b_{1}, b_{2}, \ldots is eventually constant. Fix an index jj such that bk=bjb_{k}=b_{j} for all kjk \geq j. Since ana_{n} descends to an/2a_{n} / 2 whenever an2ma_{n} \geq 2^{m}, there are infinitely many terms which are smaller than 2m2^{m}. Thus, we can choose an i>ji>j such that ai<2ma_{i}<2^{m}. From the proof of Lemma 2, ai<2ma_{i}<2^{m} and bi+1=bib_{i+1}=b_{i} can happen simultaneously only when 2ci=m2 c_{i}=m and bi+1=bi=1b_{i+1}=b_{i}=1. By Lemma 2, the sequence b1,b2,b_{1}, b_{2}, \ldots is constantly 1 and thus a1,a2,a_{1}, a_{2}, \ldots are all powers of two. Tracing the sequence starting from ai=2ci=2m/2<2ma_{i}=2^{c_{i}}=2^{m / 2}<2^{m},
2m/22m+12m2m122m2+2m 2^{m / 2} \rightarrow 2^{m+1} \rightarrow 2^{m} \rightarrow 2^{m-1} \rightarrow 2^{2 m-2}+2^{m}
Note that this last term is a power of two if and only if 2m2=m2 m-2=m. This implies that mm must be equal to 2. When m=2m=2 and a1=2a_{1}=2^{\ell} for 1\ell \geq 1 the sequence eventually cycles through 2,8,4,2,2,8,4,2, \ldots When m=2m=2 and a1=1a_{1}=1 the sequence fails as the first terms are 1,5,5/21,5,5 / 2.

Solution 2

Let mm be a positive integer and suppose that {an}\{a_{n}\} consists only of positive integers. Call a number small if it is smaller than 2m2^{m} and large otherwise. By the recursion, after a small number we have a large one and after a large one we successively divide by 2 until we get a small one.

First, we note that {an}\{a_{n}\} is bounded. Indeed, a1a_{1} turns into a small number after a finite number of steps. After this point, each small number is smaller than 2m2^{m}, so each large number is smaller than 22m+2m2^{2 m}+2^{m}. Now, since {an}\{a_{n}\} is bounded and consists only of positive integers, it is eventually periodic. We focus only on the cycle.

Any small number ana_{n} in the cycle can be written as a/2a / 2 for aa large, so an2m1a_{n} \geq 2^{m-1}, then an+122m2+2m=2m2(4+2m)a_{n+1} \geq 2^{2 m-2}+2^{m}=2^{m-2}\left(4+2^{m}\right), so we have to divide an+1a_{n+1} at least m1m-1 times by 2 until we get a small number. This means that an+m=(an2+2m)/2m1a_{n+m}=\left(a_{n}^{2}+2^{m}\right) / 2^{m-1}, so 2m1an22^{m-1} \mid a_{n}^{2}, and therefore 2(m1)/2an2^{\lceil(m-1) / 2\rceil} \mid a_{n} for any small number ana_{n} in the cycle. On the other hand, an2m1a_{n} \leq 2^{m}-1, so an+122m2m+1+1+2m2m(2m1)a_{n+1} \leq 2^{2 m}-2^{m+1}+1+2^{m} \leq 2^{m}\left(2^{m}-1\right), so we have to divide an+1a_{n+1} at most mm times by two until we get a small number. This means that after ana_{n}, the next small number is either N=am+n=(an2/2m1)+2N=a_{m+n}=\left(a_{n}^{2} / 2^{m-1}\right)+2 or am+n+1=N/2a_{m+n+1}=N / 2. In any case, 2(m1)/22^{\lceil(m-1) / 2\rceil} divides NN.

If mm is odd, then x22(mod2(m1)/2)x^{2} \equiv-2\left(\bmod 2^{\lceil(m-1) / 2\rceil}\right) has a solution x=an/2(m1)/2x=a_{n} / 2^{(m-1) / 2}. If (m1)/22m5(m-1) / 2 \geq 2 \Longleftrightarrow m \geq 5 then x22(mod4)x^{2} \equiv-2(\bmod 4), which has no solution. So if mm is odd, then m3m \leq 3.

If mm is even, then 2m1an22(m1)/2an2m/2an2^{m-1}\left|a_{n}^{2} \Longrightarrow 2^{\lceil(m-1) / 2\rceil}\right| a_{n} \Longleftrightarrow 2^{m / 2} \mid a_{n}. Then if an=2m/2xa_{n}=2^{m / 2} x, 2x22(mod2m/2)x21(mod2(m/2)1)2 x^{2} \equiv-2\left(\bmod 2^{m / 2}\right) \Longleftrightarrow x^{2} \equiv-1\left(\bmod 2^{(m / 2)-1}\right), which is not possible for m6m \geq 6. So if mm is even, then m4m \leq 4.

The cases m=1,2,3,4m=1,2,3,4 are handled manually, checking the possible small numbers in the cycle, which have to be in the interval [2m1,2m)[2^{m-1}, 2^{m}) and be divisible by 2[(m1)/2]2^{[(m-1) / 2]}:
- For m=1m=1, the only small number is 1, which leads to 5, then 5/25 / 2.
- For m=2m=2, the only eligible small number is 2, which gives the cycle (2,8,4)(2,8,4). The only way to get to 2 is by dividing 4 by 2, so the starting numbers greater than 2 are all numbers that lead to 4, which are the powers of 2.
- For m=3m=3, the eligible small numbers are 4 and 6; we then obtain 4,24,12,6,44,22,11,11/24,24,12,6,44,22,11,11 / 2.
- For m=4m=4, the eligible small numbers are 8 and 12; we then obtain 8,80,40,20,10,8,80,40,20,10, \ldots or 12,160,80,40,20,10,12,160,80,40,20,10, \ldots, but in either case 10 is not an eligible small number.

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 and solution reproduced as published; topic and difficulty added by this site.