Class Group of $\mathbb{Q}(\sqrt{-47})$ Calculate the group of $\mathbb{Q}(\sqrt{-47})$.
I have this: The Minkowski bound is $4,36$ approximately.
Thanks!
 A: Here is another attempt. In case I made any mistakes, let me know and I will either try and fix it, or delete my answer.

We have Minkowski bound $\frac{2 \sqrt{47}}{\pi}<\frac{2}{3}\cdot 7=\frac{14}{3}\approx 4.66$. So let us look at the primes $2$ and $3$:
$-47\equiv 1$ mod $8\quad\Rightarrow\quad 2$ is split, i.e. $(2)=P\overline P$ for some prime ideals $P,\overline P$.
NB: In fact we have $P=(2,\delta)$ and $\overline P=(2,\overline \delta)$ with $\delta=\frac{1+\sqrt{-47}}{2}$ and $\overline\delta=\frac{1-\sqrt{-47}}{2}$. But this is going to be irrelevant in the rest of the proof.
$-47\equiv 1$ mod $3\quad\Rightarrow\quad 3$ is split, i.e. $(3)=Q \overline Q$ for some prime ideals $Q,\overline Q$.
So the class group has at most 5 elements with representatives $(1),P,\overline P, Q, \overline Q$.
Note that $P$ is not principal, because $N(\frac{a+b\sqrt{-47}}{2})=\frac{a^2+47b^2}{4}=2$ does not have an integer solution (because $8$ is not a square). So $P$ does not have order $1$.
Suppose $P$ has order $2$. Then $P^2$ is a principal ideal with $N(P^2)=N(P)^2=2^2=4$. The only elements with norm $4$ are $\pm2$. But $P^2$ cannot be $(2)$, because $2$ is split.
Suppose $P$ has order $3$. Then $P^3$ is a principal ideal with $N(P^3)=N(P)^3=2^3=8$. But $N(\frac{a+b\sqrt{-47}}{2})=\frac{a^2+47b^2}{4}=8$ does not have an integer solution (because $32$ is not a square).
Suppose $P$ has order $4$. Then $P^4$ is a principal ideal with $N(P^4)=16$. The only elements with norm $16$ are $\pm4$. But $P^4$ cannot be $(4)$, because $(4)=(2)(2)=P\overline P P\overline P$ is the unique factorisation, and $P\ne \overline P$.
Suppose $P$ has order $5$. Then $P^5$ is a principal ideal with $N(P^5)=32$. And, indeed, the element $\frac{9+\sqrt{-47}}{2}$ has norm $32$.
So $P^5=(\frac{9+\sqrt{-47}}{2})$. Hence the class group is cyclic of order $5$.
A: You have shown that every ideal class contains an integral ideal with norm at most $4$.
Recall how primes split in quadratic fields. Because $-47$ is $1$ mod $8$, we have 
$$(2)=\left(2, \frac{1+\sqrt{-47}}{2}\right)\left(2, \frac{1-\sqrt{-47}}{2}\right).$$
Because $-47$ is $1$ mod $3$, we have 
$$(3)=(3,1-\sqrt{-47})(3,1+\sqrt{-47}).$$
It is easy to see that these are all non-principal. Note that the norm of $1+\sqrt{-47}$ is $48=2^4\cdot 3$. Note that $(3,1+\sqrt{-47})$ divides $(1+\sqrt{-47})$, with the rest of the factors being one of the two factors of $2$ above. 
This shows that we only need the prime factors of $(2)$ to generate the class group. Note that one is the inverse of the other in the class group, so it suffices to find the order of one of the prime factors. Going through the computations shows that the fifth power is the first one that is principal, so the class group is cyclic with order $5$.
A: @potato, the chip way to do this is binary forms, certainly for negative discriminants. The result is five classes, an odd number which therefore guarantees that the principal genus ("squares") contains everything. Then I threw in $\mathbb Q(\sqrt {-479})$ because it goes slightly past the online table.
Note that the original computer they gave me was named phoebus, which refers to Apollo. When that broke, they tried to call it phoebusjunior but the spelling came out a bit off.
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./classGroup
Absolute value of discriminant? 
47
  class  number  5

 all  
( 1, 1, 12)
( 2, -1, 6)
( 2, 1, 6)
( 3, -1, 4)
( 3, 1, 4)

 squares  
( 1, 1, 12)
( 2, -1, 6)
( 2, 1, 6)
( 3, -1, 4)
( 3, 1, 4)

Discriminant        -47     h :    5     Squares :    5     

================
================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./classGroup
Absolute value of discriminant? 
479
  class  number  25

 all  
( 1, 1, 120)
( 2, -1, 60)
( 2, 1, 60)
( 3, -1, 40)
( 3, 1, 40)
( 4, -1, 30)
( 4, 1, 30)
( 5, -1, 24)
( 5, 1, 24)
( 6, -5, 21)
( 6, -1, 20)
( 6, 1, 20)
( 6, 5, 21)
( 7, -5, 18)
( 7, 5, 18)
( 8, -1, 15)
( 8, 1, 15)
( 9, -5, 14)
( 9, 5, 14)
( 10, -9, 14)
( 10, -1, 12)
( 10, 1, 12)
( 10, 9, 14)
( 11, -7, 12)
( 11, 7, 12)



Discriminant       -479     h :   25     Squares :   25     Fourths :   25
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 
    jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 

================
