Let $K$ be a number field, with ring of integers $\mathcal{O}_k$. For $x\in \mathcal{O}_K$, let $f(x) = |N_{K/\mathbb{Q}}(x)|$, the (usual) absolute value of the norm of $x$ over $\mathbb{Q}$. Dirichlet's unit theorem tells us, in a precise sense, "how many" units (i.e., elements with $f(x)=1$) there are in $\mathcal{O}_K$.
My question is, are there results out there about the size (or structure) of the set of elements $\alpha\in \mathcal{O}_K$ with $f(\alpha)=n$, for some given positive integer $n$? (To make things more concrete, we could just focus on $n=2$, if it helps.)
Of course, if $f(\alpha)=n$ and $u$ is a unit, $f(u\alpha)=n$ too, so we should mod out by the action of $\mathcal{O}_K^*$ on $\mathcal{O}_K$ by multiplication, i.e., look at equivalence classes of associated elements of $\mathcal{O}_K$. If we let $S =$ this set of equivalence classes, $f$ is well-defined on $S$. For a given $n\in\mathbb{N}$, is $f^{-1}(n)$ finitely generated or (dare I hope it) finite?
Okay here is part of an answer to your question:
Let $x \in O_K$. Then it can be shown that the norm of $x$ is the norm of the ideal $(x)$ (I am presuming you know what the norm of an ideal is. If not, take a look at Pierre Samuel's book "Algebraic Theory of Numbers"). But, since $O_K$ is a Dedekind domain, it can be shown (using an argument of unique factorization of ideals into products of primes) that there are only finitely many integral ideals in $O_K$ of a given norm. Thus, up to units, there will be only finitely many elements in $O_K$ of a given norm.
Here is the reason why there are only finitely many ideals of norm $n \in \mathbb{N}$:
Let $I \subset O_K$ be an ideal of norm $n$. Then by definition of the norm of an ideal, $|O_K/I| = n$. Thus, $n \in I$. This means that $(n)O_K \subset I$. Factorize $(n)O_K$ into a product of prime ideals. Then one can see that there are only finitely many choices for $I$.