Express $4+\sqrt{-2}$ as a product of irreducibles This is part of an old Oxford Part A exam paper. (1992 A1)
Suppose we equip $R=\mathbb{Z}[\sqrt{-2}]$ with the Euclidean function $d$ defined by $$d(m+n\sqrt{-2})=|m+n\sqrt{-2}|^2$$
I want to determine the units of $R$ and express $4+\sqrt{-2}$ as a product of irreducibles and to use this to determine how many ideals of $R$ contain $4+\sqrt{-2}$. 
Progress
I think I have shown that the only units are $1,-1$, but cannot see how one can show this element is a product of irreducibles. In general, we have that in a Euclidean Domain every element is a finite product of irreducibles, but I cannot see how to calculate them.
Thanks
 A: Hint: The key is using the Euclidean function. Like many subrings of the complex plane, we have Euclidean function you give, $\phi$, such that $\phi(a+bi) = a^2+b^2$. We know that $\phi$ is multiplicative on $\mathbb{C}$ and we can show that in the case of  $\mathbb{Z}[\sqrt{-2}]$, the division algorithm works.
To determine the units of $R$, if $z$ is a unit then $zz^{-1}$=1 so $\phi(z)\phi(z^{-1})=1.$ Thus either $\phi(z)= 1$ or, without loss of generality, $\phi(z)<1$. Could we achieve this in the given ring?
To express $4+\sqrt{-2}$ as a product of irreducibles, if you can't see how to factorise directly, suppose $ab=4+\sqrt{-2}$ (where neither are units). It follows that $\phi(a)\phi(b)=18$. Using that $\mathbb{Z}$ is a UFD, and using our knowledge gained previously about what values of $\phi$ non-unit elements can take, we can determine some possible values of $\phi$ for the factors. Playing around with possible elements of a given "size" should allow you to factorise $4+\sqrt{-2}$ into smaller parts. To show that these each factor is irreducible, suppose that it is expressible as a product of non-unit elements, determine possible the values of $\phi$ the divisors can take and then show that this is not possible.
