There are numbers on the board. Each is written exactly once. Petryk and Ivasyk are playing in the following game (Petryk starts): each player erases one number from the board. If after player's turn the sum of all erased numbers (by both players) cannot be represented as a difference of squares of integers, the player loses. Who will win in this game if both players want to win?
Solution
Notice that cannot be represented as a difference of squares of integers iff . Indeed, if , then suppose . If are either both odd or both even, then , otherwise . If , then let , if , then let .
The strategy for Petryk is the following: he erases first, then if Ivasyk chooses , then Petryk erases . Since choice of number leads to loss, then Petryk wins, because if Ivasyk hasn't lost yet then Petryk has a number to erase that will not make him lose.
Looking for a route rather than an archive? The track puts 2,000
problems in a working order, from AMC 10 level to the IMO shortlist.