Let Zp[i] denote the ring {a + bi | a,b E [Z]p, i^2=-1}.

a) Show that if p is not prime, then Zp[i] is not an integral domain.

b) Suppose p is prime. Show that every non-zero element of Zp[i] is a unit iff x^2 + y^2 does not equal 0modp for any pairs x,y E [Z]p.

(Its a baby 'm' and 'p' next to the z's... couldn't find how to shrink letters! :S)