Skip to main content
OlympiadHQ

Browse · MathNet

Print

Open Contests

Estonia counting and probability

Problem

Kati and Peeter play the following game. First, Kati writes a positive integer on the blackboard. Then Peeter starts to write more numbers on the blackboard, adding at each step the number where is the biggest number on the blackboard. Peeter wins if at some point he writes a number divisible by . Otherwise Kati wins. Can Kati win, and if yes, what is the smallest number she can write to win?
Solution
The number gives the same remainder upon division by as . Hence the remainders upon division by are as in the sequence . Since , this sequence has period , whence there are at most different remainders. Hence the number gives the win to Kati if and only if neither nor is divisible by . Thus does not give a win, as it is divisible by , similarly for , as is divisible by . But for none of or is divisible by , giving a win.
Final answer
Yes; 2019

Techniques

Games / greedy algorithmsOther