MathDB
Combinatorics game

Source: First JBMO TST of France 2020, Problem 1

March 4, 2020
combinatorics

Problem Statement

Players A and B play a game. They are given a box with n=>1n=>1 candies. A starts first. On a move, if in the box there are kk candies, the player chooses positive integer ll so that l<=kl<=k and (l,k)=1(l, k) =1, and eats ll candies from the box. The player who eats the last candy wins. Who has winning strategy, in terms of nn.