Maths Olympiad Prep

Library / /116 of 120

, 2012

Algebra Difficulty 6.7 National olympiad Prove it Saudi Arabia

Let a1,a2,a_1, a_2, \dots be a sequence of positive integers such that
an+1={an2if an is even,2r+an+12if an is odd and 2r1an<2r. a_{n+1} = \begin{cases} \frac{a_n}{2} & \text{if } a_n \text{ is even,} \\ 2^r + \frac{a_n+1}{2} & \text{if } a_n \text{ is odd and } 2^{r-1} \le a_n < 2^r. \end{cases}
Prove that no matter what the value of a1a_1 is, there exists an NN such that for all n>Nn > N, an=an+2a_n = a_{n+2}.

Solution

Suppose aia_i, when expressed in binary, is a number formed by appending some number of copies of 1010 at the beginning followed by a generic kk-digit binary number. We show that continuing the recurrence from aia_i will eventually result in an NN for which n>Nn > N implies an=an+2a_n = a_{n+2}. We do so by strong induction on kk.

Our base cases will be k=0,1,2k = 0, 1, 2. First, notice that if ai=1010...1011a_i = \overline{1010...1011}, then ai+1=101010...110a_{i+1} = \overline{101010...110} (with one extra 1010 at the beginning) and ai+2=101010...11=aia_{i+2} = \overline{101010...11} = a_i, so N=iN = i works. Now we manually check the other cases:

ai=1010...10101a_i = \overline{1010...10101} : ai+1=101010...1011a_{i+1} = \overline{101010...1011}, already checked.

ai=1010...1010a_i = \overline{1010...1010} : ai+1=1010...101a_{i+1} = \overline{1010...101}, already checked.

ai=1010...10100a_i = \overline{1010...10100} : ai+1=1010...1010a_{i+1} = \overline{1010...1010}, already checked.

ai=1010...101000a_i = \overline{1010...101000} : ai+1=1010...10100a_{i+1} = \overline{1010...10100}, already checked.

ai=1010...101001a_i = \overline{1010...101001} : ai+1=101010...10101a_{i+1} = \overline{101010...10101}, already checked.

Now for the inductive step. Assume aia_i has some copies of 1010 in its binary representation followed by an arbitrary kk-digit number, and that we have shown our inductive hypothesis for all numbers less than kk.

Case 1: aia_i ends with a 00. Then ai+1a_{i+1} is the same number without that 00, so we have k1k-1 digits following the copies of 1010 and we can apply the inductive hypothesis.

Case 2: aia_i ends with a 11 and the kk-digit number is not all 11s. Then ai+1a_{i+1} is obtained by removing the 11 at the end, adding 11 to the number, and adding a 1010 to the beginning. Since the kk-digit number is not all 11s, adding 11 to it will not mess up the last copy of 1010, so the result is a (k1)(k-1)-digit binary number preceded by copies of 1010, and we can apply the inductive hypothesis.

Case 3: aia_i ends with kk 11s. Then ai+1a_{i+1} ends with 1100...01100...0, where there are k1k-1 00s, preceded by some copies of 1010. It can be easily computed that ai+ka_{i+k} will be the same number without the last k1k-1 00s, so ai+ka_{i+k} is a 22-digit binary number preceded by copies of 1010, and our base case finishes this case.

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.