Divisor game

Let N2 N \ge 2 be a positive integer. Alice and Bob play the following divisor game: starting with the set DN D_N of positive divisors of N N, the players take turns removing some elements from the set. At a player's turn, he or she chooses a divisor d d that remains, and removes d d and any of the divisors of d d that remain. The player who moves last loses.

For example: N=18,DN={1,2,3,6,9,18} N = 18, D_N = \{ 1,2,3,6,9,18 \} . Alice chooses d=2 d=2 , so she removes 1 1 and 2 2 . The remaining set is {3,6,9,18} \{3,6,9,18\} . Bob chooses d=9 d = 9 and so must also remove 3 3 . The remaining set is {6,18} \{6,18\} . Alice takes 6 6 , and now Bob is forced to take 18 18 , so he loses.

Let n2 n \ge 2 be the largest positive integer 200 \le 200 such that if Alice and Bob play the divisor game for n n and both of them play optimally, the second player wins. Find n n . If no such n n exists, enter 999 999 .

×

Problem Loading...

Note Loading...

Set Loading...