Find the ideal class group of $\mathbb{Z}\left[\frac{1+\sqrt{-31}}{2}\right]$. Find the ideal class group of $\mathbb{Z}\left[\frac{1+\sqrt{-31}}{2}\right]$.
I found the the ideal class group(ICG) is generated by primes ideals lying over 2 and 3.
$\lt 2 \gt$ =$P_2 \hat P_2$
$\lt 3 \gt$ remains primes.
so ICG= $\lt [P_2],[\hat P_2]\gt$
I only know the method, I do not understand why $P_3$ is not added as a generator.
Also, after I have to find the pricipal ideals. there is no element with norm 2 so $P_2$ is not principal. but I cannot go futher.
Could you please explain.
 A: First we compute that all elements of $Cl(K)$ are represented by some prime ideal in the composition of the ideals $(1)$, $(2)$, $(3)$.  (as upper bound we have $\frac{2}{\pi} \cdot \sqrt{31}$, which is less than $4$.
By standard arguments about ramification we find $(2) = P_2 P'_2$ is split, $(3)$ is prime in $R = \mathbb{Z}[\frac{1+\sqrt{-31}}{2}]$, as $\left( \frac{-31}{2} \right) =1 $ and $\left( \frac{-31}{3} \right) =-1 $.
Now $Cl(K)$ is given (sloppy spoken) by 'group of ideals in $R$ modulo principal ideals', i.e. every principal ideal represents the $1 \in Cl(K)$.
So as $(3)$ is principal, it is $(3) \sim (1)$, hence not a generator. So now: only $P_2$ and $P'_2$ are generators of $Cl(K)$.
We have to find out about their relations. It is $Nm(P_2) = Nm(P'_2) = 2$, $Nm(P_2^2) = Nm({P'_2}^2) = 4$. Both can not be won as the Norm of a principal ideal, as $Nm( (z) ) = \frac{1}{4}(x^2 + 31y^2)$, for some $x$ and $y$ in $\mathbb{Z}$.
Hence neither $P_2, P'_2$ nor their squares are principal.
However, $Nm(I) = 8$. Where $I=(\frac{1+ \sqrt{-31}}{2})$ a principal ideal.
Now the possible prime ideals dividing $I$ must have norm $2$, hence $I$ is a product of $3$ factors in $P_2$ or $P'_2$. 
By contradiction it cannot both $P_2$ and $P'_2$ divide $I$, as then (w.l.o.g.) $I= P_2 P_2 P'_2 = 2P_2$, but clearly $2$ doesn't divide $I$.
Again we get w.l.o.g. $I = P^3_2$, and by an analogous argument we find for $J = (\frac{ 1 - \sqrt{-31}}{2})$ that $J = P'^3_2$. Hence we get $P_2^3 \sim (1)$ and $P_2^2 \sim P'_2$ (as bot are inverse to $P_2$ in $Cl(K)$,
So under the assumption that I didn't make a mistake in my computations (arguments), for which you should always check: $P_2$ generates $Cl(K) \cong \mathbb{Z}/ 3\mathbb{Z}$
