Maths Olympiad Prep

Library / /350 of 462

Number theory Difficulty 6.5 National Olympiad Prove it Ireland

Mary and Pat play the following number game. Mary picks an initial integer greater than 20172017. She then multiplies this number by 20172017 and adds 22 to the result. Pat will add 20192019 to this new number and it will again be Mary's turn. Both players will continue to take alternating turns. Mary will always multiply the current number by 20172017 and add 22 to the result when it is her turn. Pat will always add 20192019 to the current number when it is his turn. Pat wins if any of the numbers obtained by either player is divisible by 20182018. Mary wants to prevent Pat from winning the game. Determine, with proof, the smallest initial integer Mary could choose in order to achieve this.

Solution

Let mm be the initial integer Mary has picked. Because
2017x+22x(mod2018) and 2017x + 2 \equiv 2 - x \pmod{2018} \text{ and}
x+2019x+1(mod2018), x + 2019 \equiv x + 1 \pmod{2018},
the numbers produced (mod 20182018) are
mM2mP3mM2(3m)=m1Pm m \xrightarrow{M} 2 - m \xrightarrow{P} 3 - m \xrightarrow{M} 2 - (3 - m) = m - 1 \xrightarrow{P} m
where MPM \xrightarrow{\cdot} P indicates Mary's turn and \xrightarrow{\cdot} indicates Pat's turn. We see that the values produced (mod 20182018) form a cycle of length 44. Hence, Mary wins exactly when none of the numbers m,2m,3m,m1m, 2-m, 3-m, m-1 is divisible by 20182018, i.e., if mm does not have remainder 00, 11, 22 or 33 on division by 20182018. The smallest integer greater than 20172017 that satisfies this condition is 2018+4=20222018 + 4 = 2022.

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.