Maths Olympiad Prep

Library / /8 of 8

Combinatorics Difficulty 7.5 National olympiad, round 2 Prove it Romania

On the board are written initially three consecutive positive integers, n1n-1, nn, n+1n+1. A move consists of choosing two numbers written on the board aa and bb, and replacing them with 2ab2a-b and 2ba2b-a. For what values of nn is it possible to obtain, after a succession of such moves, that two of the numbers written on the board are equal to 0?

Solution

We prove that we can obtain two 0-s on the board if and only if nn is a power of 3.

As the sum of the numbers written on the board stays the same, we must obtain on the board the numbers (0,0,3n)(0, 0, 3n). If p3p \neq 3 is a prime divisor of nn, then, in the final configuration, all the numbers are divisible by pp. But if p2abp \mid 2a-b, p2bap \mid 2b-a then p(2(2ab)+(2ba))p \mid (2(2a-b) + (2b-a)), i.e., p3ap \mid 3a. As (p,3)=1(p, 3) = 1, it follows that pap \mid a and then pbp \mid b. From the above, we deduce that if in the end all the numbers are divisible by a prime p3p \neq 3, then they were always divisible by that prime. Since \text{g.c.d.}(n1,n,n+1)=1(n-1, n, n+1) = 1, it follows that one cannot obtain two 0-s on the board if nn has prime divisors other than 3.

We are left with the case when n=3kn = 3^k, kN{0}k \in \mathbb{N} \cup \{0\}. For k=0k=0, starting from (0,1,2)(0, 1, 2), it is easy to get to (0,0,3)(0, 0, 3). Assume k1k \ge 1. Choosing at the first move a=n1a = n-1, b=n+1b = n+1, we obtain on the board numbers n3n-3, nn, n+3n+3, all multiples of 3. They can be written as 3(m1)3(m-1), 3m3m, 3(m+1)3(m+1) and the subsequent moves function as if the numbers written on the board were m1m-1, mm, m+1m+1. (After jkj \le k moves, on the board will be the numbers 3k3j3^k - 3^j, 3k3^k, 3k+3j3^k + 3^j. After move no. kk we get 0,3k,23k0, 3^k, 2 \cdot 3^k. Choosing a=3ka = 3^k and b=23kb = 2 \cdot 3^k we obtain on the board 0,0,3k+10, 0, 3^{k+1}.

Let us first prove that if n=3mn = 3^m, mN{0}m \in \mathbb{N} \cup \{0\}, then the triple (n1,n,n+1)(n-1, n, n+1) is solvable. We prove the statement by induction after m0m \ge 0.

For m=0m=0: the triple (0,1,2)(0, 1, 2) is solvable by a single move, choosing a=1,b=2a=1, b=2.

Assuming the statement to be true for mm, let us prove it for m+1m+1. Having on the board the triple (3m+11,3m+1,3m+1+1)(3^{m+1} - 1, 3^{m+1}, 3^{m+1} + 1), we choose a=3m+11a = 3^{m+1} - 1 and b=3m+1+1b = 3^{m+1} + 1 and we get to the triple (3m+13,3m+1,3m+1+3)(3^{m+1} - 3, 3^{m+1}, 3^{m+1} + 3). According to the remark (*), this triple is solvable because the inductive hypothesis tells us that the triple (3m1,3m,3m+1)(3^m - 1, 3^m, 3^m + 1) is solvable.

Let us notice that the sum of the numbers written on the board does not change while performing a move. It remains 3n3n, which is a multiple of 3. After the first move, all the numbers become equal modulo 3 because 2abab2ba(mod3)2a-b \equiv -a-b \equiv 2b-a \pmod 3. If, after the first move, they became all congruent to 1 or 2 mod 3, they will remain that way, so they can not become 0. Thus, it is mandatory that the first move makes all the numbers on the board multiples of 3. Also, if (a,b,c)(a, b, c) is solvable, i.e. can be transformed into (0,0,a+b+c)(0, 0, a+b+c) through a succession of moves, then, before the last move, the numbers written on the board have to be 0, a+b+c3\frac{a+b+c}{3} and 2(a+b+c)3\frac{2(a+b+c)}{3}, which shows that it is necessary to have 3a+b+c3 \mid a+b+c.

If n=3k+1n = 3k+1, then the last move must be (3k,3k+1,3k+2)(3k,3k,3k+3)(3k, 3k+1, 3k+2) \mapsto (3k, 3k, 3k+3). If k=0k=0, we are done (n=1n=1 is a power of 3); otherwise, this triple is solvable if and only if (k,k,k+1)(k, k, k+1) is solvable. But this triple is not solvable because the sum k+k+(k+1)k+k+(k+1) is not divisible by 3.

If n=3k+2n = 3k + 2 then the first move must be (3k+1,3k+2,3k+3)(3k,3k+3,3k+3)(3k + 1, 3k + 2, 3k + 3) \mapsto (3k, 3k + 3, 3k + 3). This triple is solvable if and only if (k,k+1,k+1)(k, k+1, k+1) is solvable. But this triple is not solvable because the sum k+(k+1)+(k+1)k + (k+1) + (k+1) is not divisible by 3.

If n=3kn = 3k, the first move must be (3k1,3k,3k+1)(3k3,3k,3k+3)(3k - 1, 3k, 3k + 1) \mapsto (3k - 3, 3k, 3k + 3). This second position is solvable if and only if (k1,k,k+1)(k-1, k, k+1) is solvable. As n0n \ne 0, there exist u,vNu, v \in \mathbb{N} such that n=3uvn = 3^u \cdot v, (v,3)=1(v, 3) = 1. Repeating this reasoning, after uu moves we get to the triple (v1,v,v+1)(v-1, v, v+1). We have seen that the only triple of this form that is solvable is (0,1,2)(0, 1, 2), therefore it is necessary for nn to be a power of 3.

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.