MathDB
removing gcd of coins from stacks

Source: USEMO 2024/1

October 26, 2024
combinatoricsGCDUSEMO 2024

Problem Statement

There are 10011001 stacks of coins S1,S2,,S1001S_1, S_2, \dots, S_{1001}. Initially, stack SkS_k has kk coins for each k=1,2,,1001k = 1,2,\dots,1001. In an operation, one selects an ordered pair (i,j)(i,j) of indices ii and jj satisfying 1i<j10011 \le i < j \le 1001 subject to two conditions:
[*]The stacks SiS_i and SjS_j must each have at least 11 coin. [*]The ordered pair (i,j)(i,j) must not have been selected before.
Then, if SiS_i and SjS_j have aa coins and bb coins respectively, one removes gcd(a,b)\gcd(a,b) coins from each stack. What is the maximum number of times this operation could be performed?
Galin Totev