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.
Problem
Source: Serbia & Montenegro 2001 2nd Grade P1
Tags: number theory
Tintarn
02.06.2021 09:14
So write $3a=x^2+2y^2$. Then one easily checks that \[a=\left(\frac{x+2y}{3}\right)^2+2\left(\frac{y-x}{3}\right)^2=\left(\frac{x-2y}{3}\right)^2+2\left(\frac{y+x}{3}\right)^2.\]Now since $x^2+2y^2$ is divisible by $3$, either $x,y$ are both divisible or both not divisible by $3$. If $3 \mid x,y$, the fractions in our representation above are already integers and we get $a \in S$. If they are both not divisible by $3$, then either $3 \mid x+y$ or $3 \mid x-y$. In the first case, also $3 \mid x-2y$ and we win by the second representation, in the second case, also $3 \mid x+2y$ and we win by the first representation from above. Done.
Behind these identities is the observation that $x^2+2y^2$ is the norm of the element $z=x+\sqrt{-2}y \in \mathbb{Z}[2i]$ i.e. it is just $(x+\sqrt{-2}y)(x-\sqrt{-2}y)$. So from $N(z_1z_2)=N(z_1)N(z_2)$ it is easy to see that if two numbers $a,b$ are in $S$, then also $ab\in S$.
In particular, since clearly $3=1^2+2 \cdot 1^2 \in S$, this shows that $a \in S$ implies $3a \in S$.
The same argument still works if we replace $x^2+2y^2$ in the definition of $S$ by any $x^2+ny^2$ ($n$ could also be negative here).
But in the problem at hand, we needed to go in the other direction: If $3a \in S$, then $a \in S$.
So we are given that $N(z)=3a$ for some $z=x+\sqrt{-2}y \in \mathbb{Z}[\sqrt{-2i}]$ and we somehow would like to divide by $3$, i.e. to consider $N\left(\frac{z}{1+\sqrt{-2}}\right)=3$. This is true, but the main point to check is whether $\frac{z}{1+\sqrt{-2}} \in \mathbb{Z}[\sqrt{-2}]$ where a priori there could be some fractions with $3$ in the denominator (exactly those in my solution above).
So here our argument above is simple, but the reason why it really works is that $\mathbb{Z}[\sqrt{-2}]$ is a Unique Factorization Domain.
One of the big moments in the beginning history of algebraic number theory was the discovery that this is not true anymore in more general $\mathbb{Z}[\sqrt{-n}]$. So here we really used the special structure of $x^2+2y^2$...!