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?
Ukrainian National Mathematical Olympiad
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.
Want a route through all this instead of an archive? The track
puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.