MathDB
Gcd of numbers on blackboard

Source: Japan Mathematical Olympiad Finals 2018 Q1

February 13, 2018
number theorygreatest common divisorinvariant

Problem Statement

Positive integers between 11 to 100100 inclusive are written on a blackboard, each exactly once. One operation involves choosing two numbers aa and bb on the blackboard and erasing them, then writing the greatest common divisor of a2+b2+2a^2+b^2+2 and a2b2+3a^2b^2+3. After a number of operations, there is only one positive integer left on the blackboard. Prove this number cannot be a perfect square.