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?


EDIT: it may be best to give the four classes as $x^2 - 51 y^2,$ $3 x^2 - 17 y^2,$ $-x^2 + 51 y^2,$ $-3 x^2 + 17 y^2.$ Indeed, it is central to Dirichlet's approach to the composition of binary quadratic forms is that a form $x^2 + AB y^2$ leads to the form $A x^2 + B y^2,$ which is probably not equivalent to the original.

$$\begin{array}{l}\text{By the pricking of my thumb,}\cr \text{Something wicked 51.}\end{array}$$

ORIGINAL: $x^2 - 51 y^2$ does not represent $\pm 3$ or $\pm 17.$ Instead, $3 x^2 + 12 xy - 5 y^2$ represents both $3$ and $-17,$ the latter with $(x=-2,y=1).$ Oh, $x^2 - 51 y^2$ is $SL_2 \mathbb Z$ equivalent to $ x^2 + 14 xy - 2 y^2.$ The four classes of binary forms of the discriminant are below, these are combined into two ideals as forms 1,2 are combined, 3,4 are combined. In case of curiosity, see http://math.blogoverflow.com/2014/08/23/binary-quadratic-forms-over-the-rational-integers-and-class-numbers-of-quadratic-%EF%AC%81elds/ Oh, one simple theorem that can be used here: for binary forms of some discriminant (here $204$) that is not a square, any given prime is integrally represented by at most one form of that discriminant and its "opposite" class, should those be distinct, and the same comment applies to representing $-p.$ The principal form (represents $1$) is always equivalent to its opposite, and we can tell that the same applies to $3 x^2 + 12 xy - 5 y^2$ because $3$ divides $12,$ that is actually the definition of "ambiguous." Same for forms numbered 2,4.

204    factored   2^2 * 3 *  17

    1.             1          14          -2   cycle length             2
    2.            -1          14           2   cycle length             2
    3.             3          12          -5   cycle length             6
    4.            -3          12           5   cycle length             6

  form class number is   4

jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

           1          14          -2   original form
 Primitively represented positive integers up to  100

           1 =  1 
          13 = 13
          21 = 3 * 7
          25 = 5^2
          30 = 2 * 3 * 5
          49 = 7^2
          70 = 2 * 5 * 7
          85 = 5 * 17
          93 = 3 * 31
          94 = 2 * 47


 Primitively represented positive integers up to  100

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

          -1          14           2   original form
 Primitively represented positive integers up to  100

           2 = 2
          15 = 3 * 5
          26 = 2 * 13
          35 = 5 * 7
          42 = 2 * 3 * 7
          47 = 47
          50 = 2 * 5^2
          51 = 3 * 17
          59 = 59
          83 = 83
          87 = 3 * 29
          98 = 2 * 7^2


 Primitively represented positive integers up to  100

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
           3          12          -5   original form
 Primitively represented positive integers up to  100

           3 = 3
           7 = 7
          10 = 2 * 5
          31 = 31
          34 = 2 * 17
          39 = 3 * 13
          58 = 2 * 29
          75 = 3 * 5^2
          79 = 79
          82 = 2 * 41
          91 = 7 * 13


 Primitively represented positive integers up to  100

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

          -3          12           5   original form
 Primitively represented positive integers up to  100

           5 = 5
           6 = 2 * 3
          14 = 2 * 7
          17 = 17
          29 = 29
          41 = 41
          62 = 2 * 31
          65 = 5 * 13
          78 = 2 * 3 * 13


 Primitively represented positive integers up to  100
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Both your equations can be transformed to $3u^2-17v^2=\pm1$ (because one of $x,y$ must be a multiple of $3$ resp. $17$). Then $$-u^2-v^2\equiv \pm1\pmod4 $$ is impossible with the plus sign and $$v^2\equiv \pm1\pmod3 $$ is impossible with the minus sign. Hence there is no solution.


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.