Skip to main content
OlympiadHQ

Browse · MathNet

Print

Stars of Mathematics Competition

Romania counting and probability

Problem

On the board are written initially three consecutive positive integers, , , . A move consists of choosing two numbers written on the board and , and replacing them with and . For what values of 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 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 . If is a prime divisor of , then, in the final configuration, all the numbers are divisible by . But if , then , i.e., . As , it follows that and then . From the above, we deduce that if in the end all the numbers are divisible by a prime , then they were always divisible by that prime. Since \text{g.c.d.}, it follows that one cannot obtain two 0-s on the board if has prime divisors other than 3.

We are left with the case when , . For , starting from , it is easy to get to . Assume . Choosing at the first move , , we obtain on the board numbers , , , all multiples of 3. They can be written as , , and the subsequent moves function as if the numbers written on the board were , , . (After moves, on the board will be the numbers , , . After move no. we get . Choosing and we obtain on the board .

Let us first prove that if , , then the triple is solvable. We prove the statement by induction after .

For : the triple is solvable by a single move, choosing .

Assuming the statement to be true for , let us prove it for . Having on the board the triple , we choose and and we get to the triple . According to the remark (*), this triple is solvable because the inductive hypothesis tells us that the triple is solvable.

Let us notice that the sum of the numbers written on the board does not change while performing a move. It remains , which is a multiple of 3. After the first move, all the numbers become equal modulo 3 because . 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 is solvable, i.e. can be transformed into through a succession of moves, then, before the last move, the numbers written on the board have to be 0, and , which shows that it is necessary to have .

If , then the last move must be . If , we are done ( is a power of 3); otherwise, this triple is solvable if and only if is solvable. But this triple is not solvable because the sum is not divisible by 3.

If then the first move must be . This triple is solvable if and only if is solvable. But this triple is not solvable because the sum is not divisible by 3.

If , the first move must be . This second position is solvable if and only if is solvable. As , there exist such that , . Repeating this reasoning, after moves we get to the triple . We have seen that the only triple of this form that is solvable is , therefore it is necessary for to be a power of 3.
Final answer
n is a power of 3 (n = 3^k for some nonnegative integer k)

Techniques

Invariants / monovariantsInduction / smoothingPrime numbersGreatest common divisors (gcd)