I was trying to prove that $\mathbb Z[i]/(a+ib)$ ($a$, $b$ are integers, not both zero) has $a^2+b^2$ number of elements. I know it's already proven on this site but I was trying to do something different.
It's easily done when either $a=0$ or $b=0$. Again, it's easy when $\gcd(a,b)= 1$ using the canonical homomorphism $\mathbb Z\to\mathbb Z[i]/(a+ib)$.
I was wondering if it holds that if $\gcd(a,b)=d$ then $$\mathbb Z[i]/(a+ib)\\\cong \mathbb Z[i]/(d)\times \mathbb Z[i]/\left(\frac ad +i\frac bd\right).$$
I think $(a+ib)=(d)\cap\left(\frac ad +i\frac bd\right)$. But will $(d)+\left(\frac ad +i\frac bd\right)=\mathbb Z[i]$ hold? I would want it to hold so that I can use the Chinese Remainder.