Maths Olympiad Prep

Track / Stage 8 / 163 of 180 #1863 of 1964

Problem 1863

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.8 Find the answer china_team_selection_test

Given positive integer nn and rr pairwise distinct primes p1,p2,,pr.p_1,p_2,\cdots,p_r. Initially, there are (n+1)r(n+1)^r numbers written on the blackboard: p1i1p2i2prir(0i1,i2,,irn).p_1^{i_1}p_2^{i_2}\cdots p_r^{i_r} (0 \le i_1,i_2,\cdots,i_r \le n).

Alice and Bob play a game by making a move by turns, with Alice going first. In Alice's round, she erases two numbers a,ba,b (not necessarily different) and write gcd(a,b)\gcd(a,b). In Bob's round, he erases two numbers a,ba,b (not necessarily different) and write lcm(a,b)\mathrm{lcm} (a,b). The game ends when only one number remains on the blackboard.

Determine the minimal possible MM such that Alice could guarantee the remaining number no greater than MM, regardless of Bob's move.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Official solution

Given positive integer n n and r r pairwise distinct primes p1,p2,,pr p_1, p_2, \cdots, p_r . Initially, there are (n+1)r (n+1)^r numbers written on the blackboard: p1i1p2i2prir p_1^{i_1} p_2^{i_2} \cdots p_r^{i_r} where 0i1,i2,,irn 0 \le i_1, i_2, \cdots, i_r \le n .

Alice and Bob play a game by making a move by turns, with Alice going first. In Alice's round, she erases two numbers a,b a, b (not necessarily different) and writes gcd(a,b)\gcd(a, b). In Bob's round, he erases two numbers a,b a, b (not necessarily different) and writes lcm(a,b)\mathrm{lcm}(a, b). The game ends when only one number remains on the blackboard.

To determine the minimal possible M M such that Alice could guarantee the remaining number no greater than M M , regardless of Bob's move, we analyze the strategies for both players.

### Alice's Strategy for n n Odd
1. Alice toggles 1 1 and Mn M^n , setting α=1\alpha = 1.
2. If Bob toggles a a and Mna \frac{M^n}{a} , then Alice takes α\alpha and [α,Mna][\alpha, \frac{M^n}{a}]. Since αMn+12\alpha \mid M^{\frac{n+1}{2}}, this pair of moves removes a a and Mna \frac{M^n}{a} .
3. If Bob toggles a a and b b for a,bα a, b \ne \alpha and abMn ab \neq M^n , then Alice toggles Mna \frac{M^n}{a} and Mnb \frac{M^n}{b} . It can be shown that [a,b]gcd(Mna,Mnb)=Mn[a, b] \cdot \gcd(\frac{M^n}{a}, \frac{M^n}{b}) = M^n.
4. If Bob toggles α\alpha and b b , then Alice toggles t t and Mnt\frac{M^n}{t} and sets α\alpha as their gcd.

### Alice's Strategy for n n Even
1. Alice toggles (1,Mn) (1, M^n) as her first move, setting α=1\alpha = 1 and β=Mn2\beta = M^{\frac{n}{2}}.
2. If Bob doesn't toggle β\beta, Alice follows the same strategy as for n n odd.
3. If Bob toggles α\alpha and β\beta, Alice sets α=gcd(T,MnT)\alpha = \gcd(T, \frac{M^n}{T}) and β=lcm(α,β)\beta = \mathrm{lcm}(\alpha, \beta).
4. If Bob toggles β\beta and x x for xα x \ne \alpha , Alice toggles [β,x][\beta, x] and Mnx\frac{M^n}{x}.

### Bob's Strategy for n n Even
1. Bob sets α=Mn2\alpha = M^{\frac{n}{2}}.
2. If Alice toggles x x and y y , Bob toggles Mnx\frac{M^n}{x} and Mny\frac{M^n}{y}.
3. If Alice toggles x x and Mnx\frac{M^n}{x} for xα x \ne \alpha , Bob toggles α\alpha and gcd(x,Mnx)\gcd(x, \frac{M^n}{x}).

### Bob's Strategy for n n Odd
1. Bob sets α=Mn12\alpha = M^{\frac{n-1}{2}} and β=Mn+12\beta = M^{\frac{n+1}{2}}.
2. If Alice toggles β\beta and α\alpha, Bob toggles T T and MnT\frac{M^n}{T}, setting β=gcd(β,α)\beta = \gcd(\beta, \alpha) and α=lcm(T,MnT)\alpha = \mathrm{lcm}(T, \frac{M^n}{T}).
3. If Alice toggles α\alpha and x x , Bob toggles gcd(α,x)\gcd(\alpha, x) and Mnx\frac{M^n}{x}.

The minimal possible M M such that Alice could guarantee the remaining number no greater than M M is Mn2 M^{\lfloor \frac{n}{2} \rfloor} , where M=i=1rpi M = \prod_{i=1}^r p_i .

The answer is: Mn2\boxed{M^{\lfloor \frac{n}{2} \rfloor}}.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.