67th International Mathematical Olympiad

Problem 1

Natural-Language Solution

Problem

There are 20262026 integers greater than 11 written on a blackboard, not necessarily distinct. In a move, Confucius chooses two integers m>1m>1 and n>1n>1 from different places on the blackboard and replaces them with

gcd(m,n)andlcm(m,n)gcd(m,n). \gcd(m,n) \quad\text{and}\quad \frac{\mathrm{lcm}(m,n)}{\gcd(m,n)}.

He continues to make moves while possible.

  1. Prove that, regardless of Confucius's choices, after finitely many moves exactly one integer MM on the blackboard is greater than 11.
  2. Prove that MM does not depend on Confucius's choices.

Here gcd\gcd denotes the greatest common divisor and lcm\mathrm{lcm} denotes the least common multiple.

Solution

Let the current entries be a1,,a2026a_1,\ldots,a_{2026}. Call an entry active if it is greater than 11.

Termination

Every entry remains positive after a move. Moreover, at least one of the two new entries is active: if g=gcd(m,n)>1g=\gcd(m,n)>1, then the new gcd entry is active; if g=1g=1, then the other new entry is

lcm(m,n)g=lcm(m,n)>1. \frac{\mathrm{lcm}(m,n)}{g}=\mathrm{lcm}(m,n)>1.

Consider the integer-valued rank

R(a1,,a2026)=2027i=12026ai+{i:ai>1}. R(a_1,\ldots,a_{2026}) =2027\prod_{i=1}^{2026}a_i +\left|\{i:a_i>1\}\right|.

Suppose a move is made using mm and nn, and put g=gcd(m,n)g=\gcd(m,n). The product of the two old entries is

mn=glcm(m,n), mn=g\mathrm{lcm}(m,n),

whereas the product of the two new entries is

glcm(m,n)g=lcm(m,n). g\cdot\frac{\mathrm{lcm}(m,n)}g =\mathrm{lcm}(m,n).

Thus the old total product is gg times the new total product. If g>1g>1, the product drops by at least 11, so the first term in RR drops by at least 20272027; meanwhile the active count can change by at most 20262026. Hence RR decreases. If g=1g=1, the product is unchanged, but the gcd entry becomes 11, while the lcm entry stays active. The two selected active entries are therefore replaced by only one active entry, so RR again decreases.

The rank is a natural number, so an infinite sequence of moves is impossible. At a terminal position there cannot be two active entries, since any two such entries would permit another move. On the other hand, the positivity argument above shows that an active entry always remains. Therefore every play terminates with exactly one entry greater than 11.

Independence of the final value

Fix a prime pp, and write vp(x)v_p(x) for the exponent of pp in xx. For the two selected entries, set

x=vp(m),y=vp(n). x=v_p(m),\qquad y=v_p(n).

After the move, their two exponents become

min(x,y)andmax(x,y)min(x,y). \min(x,y) \quad\text{and}\quad \max(x,y)-\min(x,y).

Consequently,

gcd(min(x,y),max(x,y)min(x,y))=gcd(x,y). \gcd\bigl(\min(x,y),\max(x,y)-\min(x,y)\bigr)=\gcd(x,y).

All other entries are unchanged. It follows that

dp=gcd1i2026vp(ai) d_p=\gcd_{1\le i\le 2026}v_p(a_i)

is invariant under every move.

At a terminal position all entries except the unique active entry MM equal 11, so all their pp-adic exponents are zero. Hence

vp(M)=dp v_p(M)=d_p

for every prime pp. Therefore the final value is forced to be

M=ppgcd1i2026vp(ai) \boxed{M=\prod_p p^{\gcd_{1\le i\le 2026}v_p(a_i)}}

where only primes dividing the product of the initial entries contribute. This expression depends only on the initial board, so MM is independent of every choice made during the process.