Problem

Source:

Tags: combinatorics, romania, Romanian TST, game



On a board, Ana and Bob start writing $0$s and $1$s alternatively until each of them has written $2021$ digits. Ana starts this procedure and each of them always adds a digit to the right of the already existing ones. Ana wins the game if, after they stop writing, the resulting number (in binary) can be written as the sum of two squares. Otherwise, Bob wins. Determine who has a winning strategy.