Problem

Source: Indonesian National Science Olympiad 2018, Mathematics P4

Tags: algebra



In a game, Andi and a computer take turns. At the beginning, the computer shows a polynomial $x^2 + mx + n$ where $m,n \in \mathbb{Z}$, such that it doesn't have real roots. Andi then begins the game. On his turn, Andi may change a polynomial in the form $x^2 + ax + b$ into either $x^2 + (a+b)x + b$ or $x^2 + ax + (a+b)$. However, Andi may only choose a polynomial that has real roots. On the computer's turn, it simply switches the coefficient of $x$ and the constant of the polynomial. Andi loses if he can't continue to play. Find all $(m,n)$ such that Andi always loses (in finitely many turns).