Maths Olympiad Prep

Library / /470 of 520

Number theory Difficulty 7.3 National olympiad, round 2 Prove it

Two players AA and BB play the following game. Before the game starts, AA chooses 1000 not necessarily different odd primes, and then BB chooses half of them and writes them on a blackboard. In each turn a player chooses a positive integer nn, erases some primes p1,p2,,pnp_{1}, p_{2}, \ldots, p_{n} from the blackboard and writes all the prime factors of p1p2pn2p_{1} p_{2} \ldots p_{n}-2 instead (if a prime occurs several times in the prime factorization of p1p2pn2p_{1} p_{2} \ldots p_{n}-2, it is written as many times as it occurs). Player AA starts, and the player whose move leaves the blackboard empty loses the game. Prove that one of the two players has a winning strategy and determine who.

Remark: Since 1 has no prime factors, erasing a single 3 is a legal move.

Solution

Player AA has a winning strategy.

!

Figure 1

!

Figure 2

Let player AA choose 1000 primes all congruent to 1 modulo 4. Then there are 500 primes congruent to 1 modulo 4 when the game begins. Let PP denote the parity of the number of primes congruent to 3 modulo 4 on the blackboard. When the game starts, PP is even. Remember that the number of primes congruent to 3 modulo 4 in the prime factorization of a number is even if the number is congruent to 1 modulo 4, and odd if the number is congruent to 3 modulo 4. In each turn the parity of PP changes, because the number of primes congruent to 3 modulo 4 among p1,p2,,pnp_{1}, p_{2}, \ldots, p_{n} and in the prime factorization of p1p2pn2p_{1} p_{2} \ldots p_{n}-2 is of different parity. Hence PP is odd after each of AA's turns and even after each of BB's turns, so AA cannot lose. Since the product of all the primes on the blackboard decreases with each turn, the game eventually ends, hence AA wins.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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