MathDB
Produce same numbers on the board!

Source: Indonesia National Math Olympiad 2021 Problem 6 (INAMO 2021/6)

November 9, 2021
number theoryalgorithm

Problem Statement

There are nn natural numbers written on the board. Every move, we could erase a,ba,b and change it to gcd(a,b)\gcd(a,b) and lcm(a,b)gcd(a,b)\text{lcm}(a,b) - \gcd(a,b). Prove that in finite number of moves, all numbers in the board could be made to be equal.