Problem

Source: 2020 Austrian National Competition for Advanced Students, Part 1 problem 3

Tags: combinatorics, greatest common divisor, Austria



On a blackboard there are three positive integers. In each step the three numbers on the board are denoted as $a, b, c$ such that $a >gcd(b, c)$, then $a$ gets replaced by $ a-gcd(b, c)$. The game ends if there is no way to denote the numbers such that $a >gcd(b, c)$. Prove that the game always ends and that the last three numbers on the blackboard only depend on the starting numbers. (Theresia Eisenkölbl)