Problem

Source: Serbia & Montenegro 2001 2nd Grade P1

Tags: number theory



Let $S=\{x^2+2y^2\mid x,y\in\mathbb Z\}$. If $a$ is an integer with the property that $3a$ belongs to $S$, prove that then $a$ belongs to $S$ as well.