Problem

Source: Czech and Slovak Olympiad 2017, National Round, III A p6

Tags: number theory, divisible



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.