5 isn't prime in the Gaussian integers.
Prime numbers in that ring are of the form a+ib, where either:
a
2 + b
2 is prime in
Z
or
a = 0 and |b| == 3 (mod 4), and |b| is prime in
Z
or
b = 0 and |a| == 3 (mod 4), and |a| is prime in
Z
This follows from Fermat's 2 squares theorem.
It get's weirder though - not all rings of the form
Z[sqrt(n)] are unique factorisation domains, e.g. in
Z[sqrt(-5)] we have
6 = 2*3 = (1 + sqrt(-5))(1 - sqrt(-5))
sqrt(-5) is i*sqrt(5) of course. EDIT3:
Z[sqrt(-5)] is all numbers of the form a + ib*sqrt(5), a, b integers.
That proved a major hitch proving Fermat's Last Theorem, someone claimed they had a proof but Kummer told them they had assumed unique factorisation when it didn't hold. This led to ideal theory.
EDIT: The Gaussian integers are a UFD though.
EDIT2: Several edits
