Characterizing elements with square norms in quadratic integer rings Given the ring $\mathbb{Z}\left[\sqrt{D}\right]$ (where $D$ is a positive square-free integer) can we characterize all elements $\alpha$ with positive norms for which  $N(\alpha)$ is a perfect square in $\mathbb{Z}$?
Obviously this is true for all integers, but there are also plenty of non-integers for which this could be true. For example, if we set $D=15$, then $N(8+2\sqrt{15})=4=2^2$.
 A: If $u$ is a unit then for any $n$, $$N(nu)=n^2.$$ This is the case with the example, as $4+\sqrt{15}$ is a unit. (In fact it is the fundamental unit.)
Otherwise if $\alpha=\prod \mathfrak{p}_i$ is a product of prime ideals then
$$N(\alpha)=\prod N(\mathfrak{p}_i)$$
Now $N(\mathfrak{p})$ will either be a prime number, or a perfect square, in which case $\mathfrak{p}$ is actually an inert prime from $\mathbb{Z}$.
So in order for $N(\alpha)$ to be a square, all the new primes must divide it to an even power.
A: Seeing Rene's answer: I am talking about arranging $x^2 - Dy^2 = w^2$ with $\gcd(x,y) = 1.$
$$ 8^2 - 15 \cdot 1^2 = 7^2 $$
$$ 16^2 - 15 \cdot 3^2 = 11^2 $$
$$ 23^2 - 15 \cdot 4^2 = 17^2 $$
$$  $$
$$ 83^2 - 15 \cdot 8^2 = 77^2 $$
$$  $$
$$  \left( 5 u^2 + 3 v^2 \right)^2 - 15 \left( 2uv \right)^2 =  \left( 5 u^2 - 3 v^2  \right)^2  $$
$$  \left(  u^2 + 15 v^2 \right)^2 - 15 \left( 2uv \right)^2 =  \left(  u^2 - 15 v^2  \right)^2  $$
You can accomplish this for any prime $p$ that does not divide $2D$ and for which Legendre symbol $(D|p) = 1.$ Also any product of such primes. This is nothing more than Gauss composition for binary quadratic forms of the same discriminant. All primes such as I describe are (primitively) represented by a primitive form of discriminant $4D,$ the way you are writing this. The form composed with its opposite is the principal form $x^2 - D y^2.$
