TITLE: $\mathbb Z[i]/ \langle 1+2i \rangle \cong \mathbb Z_5$
QUESTION [10 upvotes]: I am trying to prove that $\mathbb Z[i]/ \langle 1+2i \rangle$ is isomorphic to  $\mathbb  Z_5$. 
The only thing that came to my mind was trying to apply the first isomorphism theorem using an appropiate function. If I consider the euclidean function $N: Z[i] \setminus \{0 \}  \to  \mathbb N$ defined as $N(a+bi)=a^2+b^2$, then I can express any element $z$ in $\mathbb Z[i]$ as $z=(1+2i)q+r$ with $N(r)=1,2,3,4$ or $r=0$. 
If I define $f:\mathbb Z[i] \to \mathbb  Z_5$ as $f(x=(1+2i)q_x+r_x)=\overline{r_x}$, then it is clear that $f(x)=0$ if and only if $x \in  \langle 1+2i \rangle$. The problem with this function is that it doesn't satisfy $f(x+y)=f(x)+f(y)$ and it is not surjective for if $r_x=f(x)=3 (5)$, then if $r_x=a+bi$, we have $a^2+b^2=3$, which is absurd.
I don't know what else to do, any suggestions would be appreciated.

REPLY [7 votes]: One more proof. It turns out that in this case, it is easier to obtain the isomorphism by going the other direction.
Let $f: \Bbb{Z}\to \Bbb{Z}[i]/(1+2i)$ be the natural mapping, i.e. let $n$ map to $\overline{n}$ where $\overline{n}$ is the residue of $n$ as a gaussian integer mod $1+2i$. Now what is the image of this mapping? Note that $(1+2i)=(-2+i)$ since $i(1+2i)=-2+i$. Therefore $a+bi-b(-2+i)=a+2b\in \Bbb{Z}$ so $a+bi \equiv a+2b \pmod{-2+i}$. In other words, every element of $\Bbb{Z}[i]/(1+2i)$ is the image of some integer under $f$, since $f(a+2b)= a+bi + (1+2i)$.
Now we just need to show $f$ has kernel $(5)$ and we will be done since then by the first isomorphism theorem, $\Bbb{Z}/(5)\cong \Bbb{Z}[i]/(1+2i)$. But of course if $n\in \ker f$, then $1+2i \mid n$, so $1-2i$ also divides $n$, and since $1-2i$ and $1+2i$ are relatively prime, $(1+2i)(1-2i)=5 \mid n$ so $n\in (5)$. Since $1+2i \mid 5$, it is clear that $5\in\ker f$. Therefore $\ker f=(5)$ and we are done.
In general the same proof goes through for any Gaussian prime that is not an integer or $1+i$ since the argument that shows $1+i \mid n$ implies $2 \mid n$ fails here. Although the proof still goes through if you note that if $1+i \mid n$, then $n=(1+i)(a+bi)=a-b+(a+b)i$, and $b=-a$ so that $n=(1+i)(a-ai)=(1+i)(1-i)a=2a$.