If $K = \mathbb{Q}(\alpha)$ is a number field, where $\alpha$ is algebraic, and $\mathcal{O}_K$ the ring of integers in $K$, then the set of fractional ideals over $\mathcal{O}_K$ forms a group and if we mod out by the set of principal ideals, the resulting group is finite and we call its size the class number of $K$, which we denote $h(K)$.
I recently asked in a separate post (On the class number) whether the map $f(d) = h(\mathbb{Q}(\sqrt{d}))$ mapping the negative integers to the positive integers is surjective. I extend this question to a more general setting.
Define the function $g : \overline{\mathbb{Q}} \rightarrow \mathbb{N}$ by $g(\alpha) = h(\mathbb{Q}(\alpha))$. Is $g$ surjective? The question can be phrased, equivalently, as whether for a given positive integer $n$ does there exist a number field $K = \mathbb{Q}(\alpha)$ such that $h(K) = n$?
The answer to this question seems to be almost surely yes; but I am not sure of any procedures (especially relatively simple ones) that would demonstrate this. This motivates me to ask the next part of my question:
If the answer to the above question is positive, then for each $n \in \mathbb{N}$, can one construct explicitly an algebraic number $\alpha$ such that for $K = \mathbb{Q}(\alpha)$, we have $h(K) = n$ or equivalently $g(\alpha) = n$?
Thanks for any insights.