Given $p \equiv q \equiv 1 \pmod 4$, $\left(\frac{p}{q}\right) = 1$, is $N(\eta) = 1$ possible?

Given distinct primes $p$ and $q$, both congruent to $1 \pmod 4$, such that $$\left(\frac{p}{q}\right) = 1$$ and obviously also $$\left(\frac{q}{p}\right) = 1$$ is it possible for the fundamental unit of $\mathcal{O}_{\mathbb{Q}(\sqrt{pq})}$ to have a norm of $1$?

There is Theorem eleven point five point seven in saban alaca williams something strange going on with my keyboard in this paragraph< sorry>

Solutions Collecting From Web of "Given $p \equiv q \equiv 1 \pmod 4$, $\left(\frac{p}{q}\right) = 1$, is $N(\eta) = 1$ possible?"

Added: for small numbers, it seems about one out of three numbers $n=pq,$ twelve out of the smallest forty four, with primes $p \equiv q \equiv 1 \pmod 4$ and $(p|q)= (q|p) = 1,$ do give integer solutions to $x^2 – n y^2 = -1.$ The first few are
$$ 145 = 5 \cdot 29, \; \; x=12, y=1 $$
$$ 445 = 5 \cdot 89, \; \; x=4662, y=221 $$
$$ 901 = 17 \cdot 53, \; \; x=30, y=1 $$
$$ 1145 = 5 \cdot 229, \; \; x=1252, y=37 $$
$$ 1313 = 13 \cdot 101, \; \; x=616, y=17 $$
$$ 1745 = 5 \cdot 349, \; \; x=4052, y=97 $$
$$ 2249 = 13 \cdot 173, \; \; x=197140, y=4157 $$
It seems to hold steady at about one out of three, there were $5820$ successes out of the first $18000$ such numbers. There were $99284$ out of the first $300000.$

HOWEVER:

$205 = 5 \cdot 41,$ and there are no integer solutions to
$$ x^2 – 205 y^2 = -1. $$ More to the point, there are no integer solutions to
$$ x^2 + x y – 51 y^2 = -1. $$
With reference to the second screen capture below, with $x=20$ and $y=3,$
$$ 20^2 + 20 \cdot 3 – 51 \cdot 3^2 = 1. $$

Or to
$$ x^2 + 13 x y – 9 y^2 = -1. $$

$221 = 13 \cdot 17,$ and there are no integer solutions to
$$ x^2 – 221 y^2 = -1. $$ There are also no integer solutions to
$$ x^2 + x y – 55 y^2 = -1. $$
With reference to the third screen capture below, with $x=7$ and $y=1,$
$$ 7^2 + 7 \cdot 1 – 55 \cdot 1^2 = 1. $$

Or to
$$ x^2 + 13 x y – 13 y^2 = -1. $$

Screen captures from http://www.numbertheory.org/php/unit.html

enter image description here

enter image description here

enter image description here

Ummm. here is the 205 thing in my language:

=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle 1 1 -51  

  0  form              1           1         -51  delta      0
  1  form            -51          -1           1  delta      6
  2  form              1          13          -9


          -1          -6
           0          -1

To Return  
          -1           6
           0          -1

0  form   1 13 -9   delta  -1     ambiguous  
1  form   -9 5 5   delta  1
2  form   5 5 -9   delta  -1     ambiguous  
3  form   -9 13 1   delta  13
4  form   1 13 -9


  form   1 x^2  + 13 x y  -9 y^2 

minimum was   1rep   x = 1   y = 0 disc   205 dSqrt 14.317821063  M_Ratio  205
Automorph, written on right of Gram matrix:  
2  27
3  41
=========================================

And here is 221

=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle 1 1 -55   

  0  form              1           1         -55  delta      0
  1  form            -55          -1           1  delta      6
  2  form              1          13         -13


          -1          -6
           0          -1

To Return  
          -1           6
           0          -1

0  form   1 13 -13   delta  -1     ambiguous  
1  form   -13 13 1   delta  13     ambiguous  
2  form   1 13 -13


  form   1 x^2  + 13 x y  -13 y^2 

minimum was   1rep   x = 1   y = 0 disc   221 dSqrt 14.866068747  M_Ratio  221
Automorph, written on right of Gram matrix:  
-1  -13
-1  -14
=========================================

My Theorem 1 is Theorem 11.5.5 on page 279 of Alaca and Williams. My Theorem 2 is Theorem 11.5.7 on page 286 of Alaca and Williams. It turns out Theorem 2 is due to Dirichlet, 1834.

I keep forgetting why $x^2 + xy – k y^2$ dominates $u^2 – (4k+1)v^2.$ One step: take $x = u-v, y = 2v.$ Then
$$ x^2 + xy – k y^2 = u^2 – 2 uv + v^2 + 2 u v – 2 v^2 – 4 k v^2 = u^2 – (4k+1) v^2. $$

THEOREM 1: With prime $p \equiv 1 \pmod 4,$ there is always a solution to $$ x^2 – p y^2 = -1 $$ in integers. The proof is from Mordell, Diophantine Equations, pages 55-56.

PROOF: Take the smallest integer pair $T>1,U >0$ such that $$ T^2 – p U^2 = 1. $$
We know that $T$ is odd and $U$ is even. So, we have the integer equation
$$ \left( \frac{T+1}{2} \right) \left( \frac{T-1}{2} \right) = p \left( \frac{U}{2} \right)^2. $$

We have $$ \gcd \left( \left( \frac{T+1}{2} \right), \left( \frac{T-1}{2} \right) \right) = 1. $$
Indeed,
$$ \left( \frac{T+1}{2} \right) – \left( \frac{T-1}{2} \right) = 1. $$

There are now two cases, by unique factorization in integers:

$$ \mbox{(A):} \; \; \; \left( \frac{T+1}{2} \right) = p a^2, \; \; \left( \frac{T-1}{2} \right) = b^2 $$

$$ \mbox{(B):} \; \; \; \left( \frac{T+1}{2} \right) = a^2, \; \; \left( \frac{T-1}{2} \right) = p b^2 $$

Now, in case (B), we find that $(a,b)$ are smaller than $(T,U),$ but $T \geq 3, a > 1,$ and $a^2 – p b^2 = 1.$ This is a contradiction, as our hypothesis is that $(T,U)$ is minimal.

As a result, case (A) holds, with evident $$p a^2 – b^2 = \left( \frac{T+1}{2} \right) – \left( \frac{T-1}{2} \right) = 1, $$
so
$$ b^2 – p a^2 = -1. $$

THEOREM 2: With primes $p \neq q,$ with $p \equiv q \equiv 1 \pmod 4$ and Legendre $(p|q)=(q|p) = -1,$ there is always a solution to $$ x^2 – pq y^2 = -1 $$ in integers. The proof is from Mordell, Diophantine Equations, pages 55-56.

PROOF: Take the smallest integer pair $T>1,U >0$ such that $$ T^2 – pq U^2 = 1. $$
We know that $T$ is odd and $U$ is even. So, we have the integer equation
$$ \left( \frac{T+1}{2} \right) \left( \frac{T-1}{2} \right) = pq \left( \frac{U}{2} \right)^2. $$

We have $$ \gcd \left( \left( \frac{T+1}{2} \right), \left( \frac{T-1}{2} \right) \right) = 1. $$

There are now four cases, by unique factorization in integers:

$$ \mbox{(1):} \; \; \; \left( \frac{T+1}{2} \right) = a^2, \; \; \left( \frac{T-1}{2} \right) = pq b^2 $$

$$ \mbox{(2):} \; \; \; \left( \frac{T+1}{2} \right) = p a^2, \; \; \left( \frac{T-1}{2} \right) = q b^2 $$
$$ \mbox{(3):} \; \; \; \left( \frac{T+1}{2} \right) = q a^2, \; \; \left( \frac{T-1}{2} \right) = p b^2 $$
$$ \mbox{(4):} \; \; \; \left( \frac{T+1}{2} \right) = pq a^2, \; \; \left( \frac{T-1}{2} \right) = b^2 $$

Now, in case (1), we find that $(a,b)$ are smaller than $(T,U),$ but $T \geq 3, a > 1,$ and $a^2 – pq b^2 = 1.$ This is a contradiction, as our hypothesis is that $(T,U)$ is minimal.

In case $(2),$ we have
$$ p a^2 – q b^2 = 1. $$
$$ p a^2 \equiv 1 \pmod q, $$ so $a$ is nonzero mod $q,$ then
$$ p \equiv \left( \frac{1}{a} \right)^2 \pmod q. $$
This contradicts the hypothesis $(p|q) = -1.$

In case $(3),$ we have
$$ q a^2 – p b^2 = 1. $$
$$ q a^2 \equiv 1 \pmod p, $$ so $a$ is nonzero mod $p,$ then
$$ q \equiv \left( \frac{1}{a} \right)^2 \pmod p. $$
This contradicts the hypothesis $(q|p) = -1.$

As a result, case (4) holds, with evident $$pq a^2 – b^2 = \left( \frac{T+1}{2} \right) – \left( \frac{T-1}{2} \right) = 1, $$
so
$$ b^2 – pq a^2 = -1. $$

The viewpoint of real quadratic fields an norms of fundamental units is more concerned with $x^2 + xy – k y^2,$ where $4k+1 = pq$ in the second theorem. However, we showed above that the existence of a solution to $u^2 – (4k+1)v^2 = -1$ gives an immediate construction for a solution to $x^2 + xy – k y^2=-1,$ namely $x=u-v, y=2v.$

enter image description here

enter image description here

EXTRA

David Speyer reminded me of something Kaplansky wrote out for me, years and years ago. From David’s comments, I now understand what Kap was trying to show me. If $x^2 + x y – 2 k y^2 = -1,$ then $(2x+y)^2 – (8k+1)y^2 = -4. $ This is impossible $\pmod 8$ unless $y$ is even, in which case $(x + \frac{y}{2})^2 – (8k+1) \left( \frac{y}{2}\right)^2 = -1.$

There is more to it when we have $x^2 + x y – k y^2 = -1$ with odd $k.$ Take
$$ u = \frac{ 2 x^3 +3 x^2 y + (6k+3)x y^2 + (3k+1)y^3}{2}, $$
$$ v = \frac{3 x^2 y + 3 x y^2 + (k+1)y^3}{2}. $$
$$ u^2 – (4k+1) v^2 = -1, $$ since
$$ u^2 – (4k+1) v^2 = \left( x^2 + x y – k y^2 \right)^3. $$