Problem

Source: India EGMO 2021 TST P1

Tags: discrete system, invariant



Mad scientist Kyouma writes $N$ positive integers on a board. Each second, he chooses two numbers $x, y$ written on the board with $x > y$, and writes the number $x^2-y^2$ on the board. After some time, he sends the list of all the numbers on the board to Christina. She notices that all the numbers from 1 to 1000 are present on the list. Aid Christina in finding the minimum possible value of N.