Given is a nonzero integer $k$. Prove that equation $k =\frac{x^2 - xy + 2y^2}{x + y}$ has an odd number of ordered integer pairs $(x, y)$ just when $k$ is divisible by seven.
Problem
Source: Czech and Slovak Olympiad 2017, National Round, III A p6
Tags: number theory, divisible
WolfusA
02.02.2020 22:29
The equation is $$k =\frac{x^2 - xy + 2y^2}{x + y}$$
kaede
02.02.2020 23:31
$ x^{2} -( k+y) x+2y^{2} -ky=0\cdots ( \heartsuit )$ , $ x+y\neq 0$
Note that $ \begin{cases}
x+y=0\ \text{and} \ ( \heartsuit ) \ \text{if and only if} \ x=y=0\\
( x,y) =( k,0) \ \text{is solution of} \ ( \heartsuit )\\
( x,y) =( k,k) \ \text{is solution of} \ ( \heartsuit )
\end{cases}$ .
Since $ x+y\neq 0$, $ ( x,y) =( 0,0)$ is not solution of $ ( \heartsuit )$.
Suppose that $ ( x,y) =( \alpha ,\beta )$ is a solution and $ ( \alpha ,\beta ) \neq ( k,0) ,( k,k)$.
Then $ ( x,y) =( \beta -\alpha +k,\beta )$ is also solution of $ ( \heartsuit )$ and $ ( \beta -\alpha +k,\beta ) \neq ( k,0) ,( k,k)$.
Suppose that the number solutions of $ ( \heartsuit )$ is odd.
There exist $ ( \alpha ,\beta ) \in \mathbb{Z}^{2}$ such that $ ( x,y) =( \alpha ,\beta )$ is a solution, $ ( \alpha ,\beta ) \neq ( k,0) ,( k,k) \cdots ( \spadesuit )$,
and $ \beta -\alpha +k=\alpha \cdots ( \clubsuit )$ ; otherwise the number of solution is even.
Since $ ( x,y) =( \alpha ,\beta )$ is a solution, we have $ \alpha ^{2} -( k+\beta ) \alpha +2\beta ^{2} -k\beta =0\cdots ( \diamondsuit )$.
From $ ( \clubsuit )$ and $ ( \diamondsuit )$, we have $ ( k+3\beta )^{2} =16\beta ^{2}$, implying $ k\in \{-7\beta ,\beta \}$.
Assume that $ k=\beta $.
From $ ( \clubsuit )$, we have $ \alpha =k$.
So we have $ \alpha =\beta =k$, which contradicts $ ( \spadesuit )$.
So we must have $ k=-7\beta $.
Hence we have $ 7\mid k$ .
$ \blacksquare $