TITLE: Is there any conditions on a finite abelian group so that it cannot be class group of any number field?
QUESTION [10 upvotes]: The Cohen-Lenstra paper says the probability that the odd part of a class group being cyclic is close to 0.98. So I was thinking: can we find any conditions on a finite abelian group so that it cannot be a class group of any number field?

REPLY [16 votes]: It follows from the Cohen-Lenstra heuristic that every finite abelian group is expected to be isomorphic to infinitely many class groups of real quadratic fields (even to a positive proportion of real quadratics, which is stronger), but nothing like this is known.
However, if you take the Galois action into account, then things get interesting: there are Galois modules that are not isomorphic to any class group of a Galois number field with the respective Galois group. See Corollary 4.12 and the discussion following it on page 20 in this paper of mine with Lenstra: https://arxiv.org/abs/1803.06903v4. We show there that if $G$ is a cyclic group of order $58$, then there are finite $\mathbb{Z}[G]$-modules that cannot be realised as the class group of a $G$-extension.
Of course, there are cheap ways of doing that, by considering modules whose fixed submodule is something silly, contradicting the fact that the class group of $\mathbb{Q}$ is trivial, but that is not what is happening in our paper. For example our obstruction cannot be seen by looking at any particular $p$-Sylow of the class group.