# On the solvability of the negative Pell equation $x^2-2py^2 = -1$

Given prime $$p=8n+1$$. Then

$$x^2-2py^2 = -1\tag1$$

is not solvable for,

$$p_1= 17, 73, 89, 97, 193, 233, 241, 257, 281, 337, 353, 401, 433, 449, 577, 593,601, 617, 641,\dots$$

but is solvable for,

$$p_2= 41, 113, 137, 313, 409, 457, 521, 569, 761, 809, 857, 953, 1129, 1201, 1321, 1601,\dots$$

Compare to the primes of form $$p=u^2+32v^2$$ (A105389):

$$p_3 = 41, 113, 137, \color{brown}{257}, 313, \color{brown}{337}, \color{brown}{353}, 409, 457, 521, 569, \color{brown}{577}, \color{brown}{593}, 761, 809, 857, \color{brown}{881}, 953, \dots$$

(Also, $$p_3$$ has class number $$h(-p)$$ divisible by 8.)

Q: Is $$p_2$$ a subset of $$p_3$$?

(Equivalently, for $$p=8n+1$$, is it true that a necessary but not sufficient condition such that $$(1)$$ is solvable is that $$p = u^2+32v^2$$?)

I have checked that all solvable $$p = 8n+1 \leq 18089$$ has the form $$u^2+32v^2$$, but I don't know if all solvable $$p$$ have that form.

$$\color{blue}{Edit}$$: (In response to Jagy's answer.) The primes of form $$p=u^2+64v^2$$ (A014754) are,

$$p_4 = 73, 89, 113, 233, 257, 281, 337, 353, 577, 593, 601, 617, 881, 937, 1033, 1049, 1097\dots$$

but neither $$p_1$$ nor $$p_2$$ is a subset of $$p_4$$. However, the primes of form $$p=u^2+64v^2=16n+9$$,

$$p_5 = 73, 89, 233, 281, 601, 617, 937, 1033, 1049, 1097,\dots$$

as a result of Dirichlet, is unsolvable and so is a subset of $$p_1$$.

• It's not the divide by 8. And the decomposition into the sum of squares. What is not satisfied, the formula which led? It is enough to consider the equivalent form. Commented Jun 16, 2015 at 15:39
• @individ: The expression $h(-d)$ means "class number of $-d$". For example $h(-953) = 32$, hence is divisible by 8. I don't think one can answer this question by obvious elementary means. Commented Jun 16, 2015 at 15:46
• Still I do not understand. The formula in General. artofproblemsolving.com/community/c3046h1048219___2 To convert your equation to consider all of the possible equivalent forms. It will give an idea of how the sum of squares. What is the meaning of this? If all the problems are solved by one formula. Commented Jun 16, 2015 at 16:34
• do you mean that the red primes are exactly those for which h(-d) is not divisible by 8 ? Commented Jun 16, 2015 at 17:21
• just so you guys know, the second list is the list of primes for which $-1$, $2$, and $1\pm \sqrt 2$ are squares mod $p$ Commented Jun 16, 2015 at 17:47

## 1 Answer

at least a start: for $p \equiv 1 \pmod 8,$ there is a trichotomy due to Dirichlet, pages 164-165 of Buell: exactly one of $$A: \; 2 x^2 - p y^2 = 1,$$ $$B: \; 2 x^2 - p y^2 = -1,$$ $$C: \;2 x^2 - p y^2 = -2,$$ is solvable in integers. Your $(1)$ is the third choice $C$, as $y$ is then even. I'm afraid this material relates more clearly to $p = u^2 + 64 v^2,$ as the results are

If A is solvable, then C is not solvable and $p \equiv 1 \pmod {16}.$

If B is solvable, then C is not solvable and $p = u^2 + 64 v^2$

If $p \equiv 9 \pmod {16}$ and $2$ is not a fourth power, then C is solvable. Note $p \neq u^2 + 64 v^2$

These are the primes $9 \pmod {16}$ represented by $4 u^2 + 4uv + 17 v^2,$

jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$./primego Input three coefficients a b c for positive f(x,y)= a x^2 + b x y + c y^2 4 4 17 Discriminant -256 Modulus for arithmetic progressions? 16 Maximum number represented? 1700 p mod 16 17 1 41 9 97 1 137 9 193 1 241 1 313 9 401 1 409 9 433 1 449 1 457 9 521 9 569 9 641 1 673 1 761 9 769 1 809 9 857 9 929 1 953 9 977 1 1009 1 1129 9 1297 1 1321 9 1361 1 1409 1 1489 1 1657 9 1697 1 ........................  A little more: we can write$p = u^2 + 32 v^2$if and only if$p \equiv 1 \pmod 8$and there are four distinct roots to $$z^4 - 2 z^2 + 2 \equiv 0 \pmod p.$$ We can write$p = u^2 + 64 v^2$if and only if$p \equiv 1 \pmod 8$and there are four distinct roots to $$z^4 - 2 \equiv 0 \pmod p.$$ This is from the final table in Liu and Williams, about 1994. • I have simplified my question. Based on your references, is$p_2$a subset of$p_3$? (The sequences are defined in my post.) Commented Jun 17, 2015 at 3:38 • It seems the trichotomy has a result on the special case$p=16n+9$. But I think for the general$p=8n+1$, whether$p_2$is a subset of$p_3$is a good question to ask. Commented Jun 17, 2015 at 4:26 • @TitoPiezasIII, my guess would be that there is a pretty good description of your primes in terms of algebraic number theory, but not necessarily in terms of binary quadratic forms. Collected works of Dirichlet, maybe Commented Jun 17, 2015 at 4:37 • +1 for Dirichlet's result that if$p=u^2+64v^2 = 16n+9$, then$x^2-2py^2 = -1$is unsolvable. Commented Jun 17, 2015 at 5:01 • For the sequence (A133204) of general prime$p$such that$x^2-2py^2=-1$is solvable, I came across this paper, The quadratic form$x^2-2py^2\$, which might be interesting reading. Commented Jun 17, 2015 at 7:06