I am trying to work through a hw problem to show that the ring of gaussian integers $G=\{a+bi:a,b\in\mathbb{Z}\}$ is principal. To make it concrete I picked the ideal $I$ generated by $a=5$ and $b=3+4i$. I believe $I=\{xa+yb:x,y\in G\}$ since this is closed under multiplication by gaussian integers and is an additive group and is contained in any ideal containing $a$ and $b$.
An element in $I$ has squared modulus $(ax+by)(\overline{ax}+\overline{by})=25|x|^2+25|y|^2+5ax\overline{y}+5y\overline{ax}.$ So every element in $I$ has a squared modulus divisible by $5$, so $I$ does not contain the units $\pm, 1\pm i$.
So $I$ is a proper ideal generated by some gaussian integer $u+iv, u,v\in\mathbb{Z}$ with squared modulus divisible by 5. From $b=5=(x+iy)(u+iv), x,y\in\mathbb{Z}$, setting real and imaginary parts equal, I get either $v=0$ or $-y(v^2+u^2)/v=5$. This can only hold for $0\le v\le 5$ and working through the cases the only possibilities for $(u,v)$ one of $(1,0),(5,0),(0,0),(0,1),(1,2),(4,2),(0,5)$. The only ones with squared modulus divisible by 5 are $(5,0),(1,2),(0,5)$. But for none of these does $a=3+4i=(x'+iy')(u+iv)$ have a solution with $x,y\in \mathbb{Z}$.
You can note that $$ (2+i)^2=4+4i-1=3+4i $$ and that $5=(2+i)(2-i)$. So the greatest common divisor is $2+i$, which is the generator of the ideal.