# Class number of imaginary quadratic fields

Let $$n$$ be a positive squarefree integer, and let $$h_n$$ denote the class number of the imaginary quadratic field $$\mathbb{Q}(\sqrt{-n})$$. Then, is it true that $$h_n$$ is odd if and only if $$n$$ is a prime? If yes, then could you please provide a reference to this statement?

I'm new to class field theory and genus theory so I do not know what's been proven or known about this in the literature.

Thank you.

The condition shouldn't be "$$n$$ is prime" but "$$n$$ is either 1, 2, or a prime congruent to 3 mod 4". For instance $$\mathbb{Q}(-5)$$ has class number 2.
The more general statement that the 2-torsion subgroup of the class group (i.e. the subgroup of elements of order 1 or 2) has order $$2^{d-1}$$, where $$d$$ is the number of prime factors of the discriminant. Here is a student project which gives a very detailed proof of this statement, without using any heavy machinery beyond the definitions.
• Leoffler Is there a known characterization of particular class of $n$ for which if the class number is odd then $n$ is always a prime? Say, if $n\equiv11\pmod{24}$, then, $h_n$ is odd if and only if $n$ is a prime? Thanks! Sep 30, 2022 at 6:56
• That is already answered above. If $n$ is squarefree and $3 \bmod 4$, then the implication "$h_n$ is odd iff $n$ is prime" holds. Sep 30, 2022 at 7:13