Given positive integer n and r pairwise distinct primes p1,p2,⋯,pr. Initially, there are (n+1)r numbers written on the blackboard: p1i1p2i2⋯prir where 0≤i1,i2,⋯,ir≤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 (not necessarily different) and writes gcd(a,b). In Bob's round, he erases two numbers a,b (not necessarily different) and writes lcm(a,b). The game ends when only one number remains on the blackboard.
To determine the minimal possible M such that Alice could guarantee the remaining number no greater than M, regardless of Bob's move, we analyze the strategies for both players.
### Alice's Strategy for n Odd
1. Alice toggles 1 and Mn, setting α=1.
2. If Bob toggles a and aMn, then Alice takes α and [α,aMn]. Since α∣M2n+1, this pair of moves removes a and aMn.
3. If Bob toggles a and b for a,b=α and ab=Mn, then Alice toggles aMn and bMn. It can be shown that [a,b]⋅gcd(aMn,bMn)=Mn.
4. If Bob toggles α and b, then Alice toggles t and tMn and sets α as their gcd.
### Alice's Strategy for n Even
1. Alice toggles (1,Mn) as her first move, setting α=1 and β=M2n.
2. If Bob doesn't toggle β, Alice follows the same strategy as for n odd.
3. If Bob toggles α and β, Alice sets α=gcd(T,TMn) and β=lcm(α,β).
4. If Bob toggles β and x for x=α, Alice toggles [β,x] and xMn.
### Bob's Strategy for n Even
1. Bob sets α=M2n.
2. If Alice toggles x and y, Bob toggles xMn and yMn.
3. If Alice toggles x and xMn for x=α, Bob toggles α and gcd(x,xMn).
### Bob's Strategy for n Odd
1. Bob sets α=M2n−1 and β=M2n+1.
2. If Alice toggles β and α, Bob toggles T and TMn, setting β=gcd(β,α) and α=lcm(T,TMn).
3. If Alice toggles α and x, Bob toggles gcd(α,x) and xMn.
The minimal possible M such that Alice could guarantee the remaining number no greater than M is M⌊2n⌋, where M=∏i=1rpi.
The answer is: M⌊2n⌋.