How would one describe set of elements of $\mathbb{Z}(\sqrt{-d})$ whose norm are divisible by a rational prime $p$? If we consider non-UFD's with $d > 1$, how would one go about describing the integers in $\mathbb{Z}(\sqrt{-d})$ whose norm is divisible by a prime $p$ but under the stipulation that it must be done using principal Ideals? Can it be done? I'll detail what I mean;
An example for a UFD would be the following;
Let $f(\alpha)=1$ for $\alpha \in \mathbb{Z}(\sqrt{-1})$, and 0 otherwise.. I want a new function, $g(\alpha)$, such that $g(\alpha)=1$ if $p \mid N\alpha$, otherwise $g(\alpha)=0$. For an inert prime $p$, $g(\alpha)=f(\frac{\alpha}{p})$. If p splits, then $g(\alpha)=f(\frac{\alpha}{\mathfrak{p}})+f(\frac{\alpha}{\bar{\mathfrak{p}}})-f(\frac{\alpha}{N(\mathfrak{p})})$ where $N(\mathfrak{p})=p$. In other words, how can we construct $g$ using only $f$ for Imaginary quadratic fields without unique factorization? An example would be much appreciated.
 A: The functions $f$ and $g$ can be defined, but they have to operate on ideals rather than numbers, and those ideals may or may not be principal.
First, though, let's tidy up the notation. $f_R(\alpha) = 1$ (or True) if $\alpha$ is a number in the ring $R$, and $0$ (or False) otherwise. And $g_R^p(\alpha) = 1$ if $\alpha$ is a number in the prime ideal generated by $p$, or by a splitting factor of $p$, or co-generated by $p$.
Now let's examine $\alpha = 82$, $p = 41$ and $R = \textbf{Z}[i]$. Since $41$ splits as $(4 - 5i)(4 + 5i)$, we have $$g_R^p(\alpha) = f_{\textbf{Z}[i]}\left(\frac{82}{4 - 5i}\right) + f_{\textbf{Z}[i]}\left(\frac{82}{4 + 5i}\right) - f_{\textbf{Z}[i]}\left(\frac{82}{41}\right) = 1 + 1 - 1 = 1.$$ That's correct, right?
Now try $\alpha = 86$, $p = 43$. As $43$ is inert, we have $g_R^p(\alpha) = 1$, as expected.
Let's move on to $g_{\textbf{Z}[\sqrt{-5}]}^{41}(82)$. Since $41$ splits as $(6 - \sqrt{-5})(6 + \sqrt{-5})$, the result should be much the same as $g_{\textbf{Z}[i]}^{41}(82)$.
And now we get to something really interesting: $g_{\textbf{Z}[\sqrt{-5}]}^{43}(76 + 18 \sqrt{-5})$. $43$ is inert in this ring, and yet $N(76 + 18 \sqrt{-5}) = 7396$, a multiple of $43$. Worse, $$\frac{76 + 18 \sqrt{-5}}{43} = \frac{2}{43}(38 + 9 \sqrt{-5}),$$ so $$f_{\textbf{Z}[\sqrt{-5}]}\left(\frac{76 + 18 \sqrt{-5}}{43}\right) = 0.$$
If instead we defined $g_R^p(\alpha)$ to look for the containment of $\langle \alpha \rangle$ in $\langle p \rangle$ or $\langle p, x \rangle$ or $\langle p, \overline x \rangle$, we might get the result we want, since $\langle 76 + 18 \sqrt{-5} \rangle$ is in either $\langle 43, 9 + \sqrt{-5} \rangle$ or $\langle 43, 9 - \sqrt{-5} \rangle$, one of those.
A: I don't think what you're asking for is possible, at least not for some rational primes. Let me build on the example Mr. Brooks gave in a comment yesterday.
The classic non-UFD is $\mathbb Z[\sqrt{-5}]$. Consider the rational prime $p = 3$. The norm function in the field $\mathbb Q(\sqrt{-5})$ is $N(a + b\sqrt{-5}) = a^2 + 5b^2$. Possible integer norms are 0, 1, 4, 5, 6, 9, ...
Since 3 is an impossible norm, that means 3 is irreducible. But 6, the first nontrivial positive multiple of 3, is a possible norm, and in fact $(1 - \sqrt{-5})(1 + \sqrt{-5}) = 6$.
So if the union of $\mathfrak P_1$ and $\mathfrak P_2$ contains all numbers in this domain with norm divisible by 3, it looks something like $\langle 3, 1 - \sqrt{-5} \rangle \cup \langle 3, 1 + \sqrt{-5} \rangle$.
But neither of those two ideals are principal. Or at least they don't look principal. If either of them was principal, we'd be able to solve $x \pm x\sqrt{-5} = 3$ or $3x = 1 \pm \sqrt{-5}$ with $x \in \mathbb Z[\sqrt{-5}]$.
What would be the norm of this number $x$? Remember that the norm is a multiplicative function. To solve the former equation, we would have to have $$N(x) = \frac{3}{2},$$ which is not an integer at all, and to solve the latter equation we'd need $N(x) = 2$, an impossible norm in this domain.
Now let's look at $2 + \sqrt{-5}$. Since this number has a norm of 9, it must be contained in $\mathfrak P_1 \cup \mathfrak P_2$. I emphasize that $(2 + \sqrt{-5}) \not\in \langle 3 \rangle$ nor $\langle 1 - \sqrt{-5} \rangle$ nor $\langle 1 + \sqrt{-5} \rangle$.
If $\mathfrak P_1 = \langle 3, 1 - \sqrt{-5} \rangle$, it consists of all numbers in this domain of the form $3\alpha + (1 - \sqrt{-5})\beta$, with $\alpha$ and $\beta$ also numbers in this domain. And since $3 + (-1 + \sqrt{-5}) = 2 + \sqrt{-5}$, that means $\alpha = 1$ and $\beta = -1$ is our verification that $(2 + \sqrt{-5}) \in \mathfrak P_1$.
EDIT: Thanks to Dave R. for pointing out a mistake of arithmetic. I've corrected it now.
