Maths Olympiad Prep

Library / Stars of Mathematics Competition /7 of 7

Stars of Mathematics Competition

Combinatorics Difficulty 7.5 National Olympiad, round 2 Prove it Romania

On the board are written initially three consecutive positive integers, n−1n-1, nn, n+1n+1. A move consists of choosing two numbers written on the board aa and bb, and replacing them with 2a−b2a-b and 2b−a2b-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 p≠3p \neq 3 is a prime divisor of nn, then, in the final configuration, all the numbers are divisible by pp. But if p∣2a−bp \mid 2a-b, p∣2b−ap \mid 2b-a then p∣(2(2a−b)+(2b−a))p \mid (2(2a-b) + (2b-a)), i.e., p∣3ap \mid 3a. As (p,3)=1(p, 3) = 1, it follows that p∣ap \mid a and then p∣bp \mid b. From the above, we deduce that if in the end all the numbers are divisible by a prime p≠3p \neq 3, then they were always divisible by that prime. Since g.c.d.\text{g.c.d.}(n−1,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, k∈N∪{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 k≥1k \ge 1. Choosing at the first move a=n−1a = n-1, b=n+1b = n+1, we obtain on the board numbers n−3n-3, nn, n+3n+3, all multiples of 3. They can be written as 3(m−1)3(m-1), 3m3m, 3(m+1)3(m+1) and the subsequent moves function as if the numbers written on the board were m−1m-1, mm, m+1m+1. (After j≤kj \le k moves, on the board will be the numbers 3k−3j3^k - 3^j, 3k3^k, 3k+3j3^k + 3^j. After move no. kk we get 0,3k,2⋅3k0, 3^k, 2 \cdot 3^k. Choosing a=3ka = 3^k and b=2⋅3kb = 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, m∈N∪{0}m \in \mathbb{N} \cup \{0\}, then the triple (n−1,n,n+1)(n-1, n, n+1) is solvable. We prove the statement by induction after m≥0m \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+1−1,3m+1,3m+1+1)(3^{m+1} - 1, 3^{m+1}, 3^{m+1} + 1), we choose a=3m+1−1a = 3^{m+1} - 1 and b=3m+1+1b = 3^{m+1} + 1 and we get to the triple (3m+1−3,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 (3m−1,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 2a−b≡−a−b≡2b−a(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 3∣a+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 (3k−1,3k,3k+1)↦(3k−3,3k,3k+3)(3k - 1, 3k, 3k + 1) \mapsto (3k - 3, 3k, 3k + 3). This second position is solvable if and only if (k−1,k,k+1)(k-1, k, k+1) is solvable. As n≠0n \ne 0, there exist u,v∈Nu, v \in \mathbb{N} such that n=3u⋅vn = 3^u \cdot v, (v,3)=1(v, 3) = 1. Repeating this reasoning, after uu moves we get to the triple (v−1,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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.