Problem

Source: Indonesian National Mathematical Olympiad 2024, Problem 4 (Day 1)

Tags: Game Theory, Integers, combinatorics, number theory, Inamo



Kobar and Borah are playing on a whiteboard with the following rules: They start with two distinct positive integers on the board. On each step, beginning with Kobar, each player takes turns changing the numbers on the board, either from P and Q to 2PQ and 2QP, or from P and Q to 5P4Q and 5Q4P. The game ends if a player writes an integer that is not positive. That player is declared to lose, and the opponent is declared the winner. At the beginning of the game, the two numbers on the board are 2024 and A. If it is known that Kobar does not lose on his first move, determine the largest possible value of A so that Borah can win this game.