Consider the number field $K = \mathbf{Q}(\sqrt{-5})$, which has ring of integers $\mathcal{O}_K = \mathbf{Z}[\sqrt{-5}]$. It is known that the class number of $K$ is $2$. It is also true that you can write the element $6$ as a product of irreducible elements in two different ways:
$$ 6 = (1+\sqrt{-5})(1-\sqrt{-5}) = (2)(3).$$
I am noticing that the class number is $2$ and the number of different ways to factor $6$ is also $2$; is this a coincidence, or is this true in general?
That is, if a number field $K$ has class number equal to $k$, can we always find an element $x \in \mathcal{O}_K$ that can be factored into irreducibles in $k$ different ways? Is the class number of a number field $K$ equal to the maximum number of ways an element in $\mathcal{O}_K$ can be factored into irreducibles?
(Here, I am considering two factorizations to be the same if they are equal up to units; e.g: $6 = 2\cdot 3$ and $6 = (-2)*(-3)$ are the "same" factorization in $\mathbf{Z}$.)
If the class group is not 1 then there are infinitely many non-principal prime ideals, from which we get a sequence of distinct prime ideals $P_j$ all equivalent in the class group. Let $n$ be the order of $P_1$, then for all $m$ and $l\in n\ldots nm$, $$\underbrace{\prod_{j=1}^{mn} P_j}_{(a_m)} = \underbrace{(P_l \prod_{j=1}^{n-1} P_j)}_{(b_{m,l})}\underbrace{(\prod_{j=n,j\ne l}^{nm} P_j)}_{(c_{m,l})}$$ Then $b_{m,l}$ is irreducible and it doesn't divide any of the $c_{m,i}$, so you get at least $n(m-1)+1$ factorizations of $a_m$.