MathDB
Replace a and b with a-2b

Source: Cyprus 2022 Junior TST-3 Problem 4

March 26, 2022
combinatoricsinvariant

Problem Statement

The numbers 1,2,3,,101, 2, 3, \ldots , 10 are written on the blackboard. In each step, Andrew chooses two numbers a,ba, b which are written on the blackboard such that a2ba\geqslant 2b, he erases them, and in their place writes the number a2ba-2b.
Find all numbers nn, such that after a sequence of steps as above, at the end only the number nn will remain on the blackboard.