MathDB
Putting two colored papers into folders

Source: Azerbaijan IMO TST 2018, D3 P1

August 3, 2023
combinatorics

Problem Statement

Let mm and nn be natural numbers. Professor Mubariz has mm folders and Professor Nazim has nn folders; initially, all folders are empty. Every day, where the day numbers are marked as d=1,2,3....,d = 1,2,3 ...., Prof. Mubariz is given 20182018 blue papers, and Prof. Nazim is given 20182018 orange papers. On day d(d=1,2,3,...),d ( d = 1, 2, 3, ...), they both perform the following operations:
[*] If the 20182018 papers given to this professor are not enough to place dd papers in each of his folders, then he distributes all the 20182018 papers given to him to his students. If the 20182018 papers given to this professor are enough to place dd papers in each of his folders, firstly, he places dd papers in each of his folders. [*] If this professor still has papers left after the first step, he places them in the other professor's folders, with the same number in each folder and as many as possible. [*] If this professor still has papers left after the second step, he distributes them to his students.
Prove that after 66 years, the number of blue papers in one folder of Prof. Nazim will be equal to the number of orange papers in one folder of Prof. Mubariz.