Something screwy going on in $\mathbb Z[\sqrt{51}]$ In $\mathbb Z[\sqrt{6}]$, I can readily find that $(-1)(2 - \sqrt{6})(2 + \sqrt{6}) = 2$ and $(3 - \sqrt{6})(3 + \sqrt{6}) = 3$. It looks strange but it checks out.
But when I try the same thing for $3$ and $17$ in $\mathbb Z[\sqrt{51}]$ I seem to run into a wall. I can't solve $x^2 - 51y^2 = \pm3$ in integers, nor $x^2 - 51y^2 = \pm17$. I've had six decades in which to get rusty at solving equations in two variables, so maybe I have managed to overlook solutions to both of these. Or could it really be possible that $3$ and $17$ are actually irreducible in this domain?

There is one crucial difference between $\mathbb{Z}[\sqrt{6}]$ and $\mathbb{Z}[\sqrt{51}]$: one is a unique factorization domain, the other is not. You have to accept that some of the tools that come in so handy in UFDs are just not as useful in non-UFDs.
One of those tools is the Legendre symbol. Given distinct primes $p, q, r \in \mathbb{Z}^+$, if $\mathbb{Z}[\sqrt{pq}]$ is a unique factorization domain, then $\left(\frac{pq}{r}\right)$ reliably tells you whether $r$ is reducible or irreducible in $\mathbb{Z}[\sqrt{pq}]$. Also, both $p$ and $q$ are composite, because otherwise you'd have $pq$ and $(\sqrt{pq})^2$ as valid distinct factorizations of $pq$, contradicting that $\mathbb{Z}[\sqrt{pq}]$ is a unique factorization domain.
Of course if $\left(\frac{pq}{r}\right) = -1$, then $r$ is irreducible regardless of the class number of $\mathbb{Z}[\sqrt{pq}]$. But if $\mathbb{Z}[\sqrt{pq}]$ has class number 2 or greater, then a lot of expectations break down. It can happen that $\left(\frac{pq}{r}\right) = 1$ and yet $r$ is nonetheless irreducible, e.g., $\left(\frac{51}{5}\right) = 1$, yet 5 is irreducible.
And it can also happen in a non-UFD that $pq$ and $(\sqrt{pq})^2$ are both valid distinct factorizations of $pq$. This is by no means unique to $\mathbb{Z}[\sqrt{51}]$. It happens with 2 and 5 in $\mathbb{Z}[\sqrt{10}]$, 3 and 5 in $\mathbb{Z}[\sqrt{15}]$, 2 and 13 in $\mathbb{Z}[\sqrt{26}]$, etc. In fact, I'd be very surprised if someone showed me an example of a non-UFD $\mathbb{Z}[\sqrt{pq}]$ in which both $p$ and $q$ are composite.
