TITLE: Quadratic polynomial with alternate negative value
QUESTION [6 upvotes]: Let $f(x)=-x^2+ax+b$, where $a,b\in\mathbb{R}$. Suppose there exist distinct integers $m,n$ such that $f(m)=-n^2$ and $f(n)=-m^2$. 
Prove that there are infinitely many pairs of integers $x,y$ such that $f(x)=-y^2$ and $f(y)=-x^2$.
[Source: Russian competition problem]

REPLY [2 votes]: We have
$$m^2-n^2=f(m)-f(n)=n^2-m^2+a(m-n).$$
So 
$$a=2(m+n)\tag{1}.$$
On the other hand
$$-(m^2+n^2)=f(m)+f(n)=-(m^2+n^2)+a(m+n)+2b,$$
which implies
$$b=-(m+n)^2.\tag{2}$$
(1) and (2) imply that 
$$a=2k,b=-k^2,$$
with $k\in\Bbb Z$ and that
$$f(x)=-x^2+2kx-k^2=-(x-k)^2.$$
The statement is now obvious as long as $x+y=k$, and of course $x\neq y$.