MathDB
Game with piles of stones

Source: St Petersburg 2022 9.5~10.4

September 28, 2022
combinatorics

Problem Statement

There are two piles of stones: 17031703 stones in one pile and 20222022 in the other. Sasha and Olya play the game, making moves in turn, Sasha starts. Let before the player's move the heaps contain aa and bb stones, with aba \geq b. Then, on his own move, the player is allowed take from the pile with aa stones any number of stones from 11 to bb. A player loses if he can't make a move. Who wins?
Remark: For 10.4, the initial numbers are (444,999)(444,999)