This seems very simple, but I have not been able to come up with an answer to it.
Suppose $a+bi \mid n$ in $\mathbb{Z}[i]$, where $a,b \in \mathbb{Z}$ with $(a,b)=1$. Prove that $a^2 + b^2 \mid n$ in $\mathbb{Z}$.
My attempt was: $a+bi \mid n \implies \overline{a+bi}\mid n$ (otherwise $n$ is not an integer), and if we have that $(a+bi,a-bi)=1$ (or a unit) in $\mathbb{Z}[i]$, then by unique factorization this implies that $(a+bi)(a-bi)\mid n$. However, I found it difficult to prove $(a,b)=1$ in $\mathbb{Z} \implies$ $(a+bi,a-bi)=1$ in $\mathbb{Z}[i]$.
Does anyone have a nice solution to this? Any solution is welcome.
For additional context, this question came up as I was trying to prove that $\mathbb{Z}[i]/(a-ib) \cong \mathbb{Z}/(a^{2}+b^{2})\mathbb{Z}$ when $a,b$ are coprime in the integers. A way of doing this using natural injections is given in Quotient ring of Gaussian integers, where there are many very good answers. One way is to use the first isomorphism theorem with the canonical map $\mathbb Z \to \mathbb Z[i]/(a - i b)$, and I need to prove that the kernel of that map is $\langle a^2+b^2 \rangle$. In every answer I saw on this, the solution skips over that step, making me suspect that there's something very simple I'm missing.