Olympiad Maths Prep

Library / /48 of 60

Number theory Difficulty 6.5 National olympiad Prove it Ukraine

There are numbers 1,2,3,,1001, 2, 3, \ldots, 100 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 nn cannot be represented as a difference of squares of integers iff n2(mod4)n \equiv 2 \pmod{4}. Indeed, if n2(mod4)n \equiv 2 \pmod{4}, then suppose n=(x+y)(xy)n = (x + y)(x - y). If x,yx, y are either both odd or both even, then n0(mod4)n \equiv 0 \pmod{4}, otherwise n±1(mod4)n \equiv \pm 1 \pmod{4}. If n=4kn = 4k, then let x=k+1,y=k1x = k + 1, y = k - 1, if n±1(mod4)n \equiv \pm 1 \pmod{4}, then let x=n+12,y=n12x = \frac{n+1}{2}, y = \frac{n-1}{2}.

The strategy for Petryk is the following: he erases 100100 first, then if Ivasyk chooses mm, then Petryk erases 100m100-m. Since choice of number 5050 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.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.