Skip to main content
OlympiadHQ

Browse · MathNet

Print

APMO

algebra

Problem

Let be a fixed positive integer. The infinite sequence is defined in the following way: is a positive integer, and for every integer we have For each , determine all possible values of such that every term in the sequence is an integer.
Solution
Suppose that for integers and all the terms of the sequence are integers. For each , write the th term of the sequence as where is the largest odd divisor of (the "odd part" of ) and is a nonnegative integer.

Lemma 1. The sequence is bounded above by .

Proof. Suppose this is not the case and take an index for which and for which is minimal. Since , we are in the second case of the recursion. Therefore, and thus and . This contradicts the minimality of .

Lemma 2. The sequence is nondecreasing.

Proof. If , then and thus . On the other hand, if , then and we have the following cases: - If , then , so . - If , then , so . - If , then , so since .

By combining these two lemmas we obtain that the sequence is eventually constant. Fix an index such that for all . Since descends to whenever , there are infinitely many terms which are smaller than . Thus, we can choose an such that . From the proof of Lemma 2, and can happen simultaneously only when and . By Lemma 2, the sequence is constantly 1 and thus are all powers of two. Tracing the sequence starting from , Note that this last term is a power of two if and only if . This implies that must be equal to 2. When and for the sequence eventually cycles through When and the sequence fails as the first terms are .

---

Alternative solution.

Let be a positive integer and suppose that consists only of positive integers. Call a number small if it is smaller than 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 is bounded. Indeed, turns into a small number after a finite number of steps. After this point, each small number is smaller than , so each large number is smaller than . Now, since is bounded and consists only of positive integers, it is eventually periodic. We focus only on the cycle.

Any small number in the cycle can be written as for large, so , then , so we have to divide at least times by 2 until we get a small number. This means that , so , and therefore for any small number in the cycle. On the other hand, , so , so we have to divide at most times by two until we get a small number. This means that after , the next small number is either or . In any case, divides .

If is odd, then has a solution . If then , which has no solution. So if is odd, then .

If is even, then . Then if , , which is not possible for . So if is even, then .

The cases are handled manually, checking the possible small numbers in the cycle, which have to be in the interval and be divisible by : - For , the only small number is 1, which leads to 5, then . - For , the only eligible small number is 2, which gives the cycle . 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 , the eligible small numbers are 4 and 6; we then obtain . - For , the eligible small numbers are 8 and 12; we then obtain or , but in either case 10 is not an eligible small number.
Final answer
Only when m = 2, and then exactly for starting values a1 = 2^ℓ with ℓ ≥ 1; for all other m there is no valid starting value.

Techniques

Recurrence relationsFactorization techniquesTechniques: modulo, size analysis, order analysis, inequalities