# Is the diophantine equation $3x^2+1=py^2$ always solvable for each prime $p\equiv 13\pmod{24}$?

In Question 337879, I conjectured that for any prime $$p\equiv3\pmod4$$ the equation $$3x^2+4\left(\frac p3\right)=py^2\tag{1}$$ always has integer solutions, where $$(\frac p3)$$ is the Legendre symbol. Motivated by this, here I pose the following conjectures.

Conjecture 1. For any prime $$p\equiv13\pmod{24}$$, the equation $$3x^2+1=py^2\tag{2}$$ always has integer solutions.

For example, when $$p=829$$ the least positive integer solution of $$(2)$$ is $$(x,\,y)=(1778674,\,106999).$$

Conjecture 2. For any prime $$p\equiv3\pmod4$$, the equation $$2x^2-py^2=\left(\frac 2p\right)\tag{3}$$ always has integer solutions, where $$(-)$$ is the Legendre symbol.

For example, when $$p=167$$ the smallest positive integer solution of $$(3)$$ is $$(x,\,y)=(3993882,\,437071).$$

Conjecture 3. For any prime $$p\equiv3\pmod4$$ and $$q\in\{7,11,19,43,67,163\}$$, the equation $$qx^2+4\left(\frac pq\right)=py^2\tag{4}$$ always has integer solutions.

QUESTION. How to solve the conjectures?

• After learning this conjecture from me, Prof. Bo He has verified my above conjecture for all primes $p<72253$ with $p\equiv13\pmod{24}$. – Zhi-Wei Sun Aug 14 '19 at 11:55
• Note that those imaginary quadratic fields $\mathbb Q(\sqrt{-q})$ with $q\in\{1,2,3,7,11,19,43,67,163\}$ has class number one! – Zhi-Wei Sun Aug 14 '19 at 14:00
• Prof. Ping-Zhi Yuan has just told me that he could prove Conjecture 2. – Zhi-Wei Sun Aug 14 '19 at 14:12
• Prof. Bo He has just verified my Conjecture 3 with $q=163$ for all primes $p<5107$ with $p\equiv3\pmod4$. – Zhi-Wei Sun Aug 14 '19 at 15:35

Updated on 2019/08/21: I prove Conjectures 1-3 below. I will use the usual terminology and notations for binary quadratic forms. In particular, I will use the first two pages of Pall: Discriminantal divisors of binary quadratic forms, J. Number Theory 1 (1969), 525-533.

Proof of Conjecture 1. Consider the fundamental discriminant $$d=12p$$. The generic characters for this discriminant are $$\bigl(\tfrac{\cdot}{3}\bigr)$$, $$\bigl(\frac{\cdot}{p}\bigr)$$, $$\bigl(\frac{-1}{\cdot}\bigr)$$, hence there are $$2^3/2=4$$ genera. Also, there are $$8$$ ancipital forms of discriminant $$d$$ and positive first coefficient, which belong to the various genera as follows: $$[1,0,-3p]\quad\text{and}\quad[p,0,-3]\quad\text{belong to the signs}\quad +++$$ $$[3p,0,-1]\quad\text{and}\quad[3,0,-p]\quad\text{belong to the signs}\quad -+-$$ $$[2,2,(1-3p)/2]\quad\text{and}\quad[2p,2p,(p-3)/2]\quad\text{belong to the signs}\quad --+$$ $$[6p,6p,(3p-1)/2]\quad\text{and}\quad[6,6,(3-p)/2]\quad\text{belong to the signs}\quad +--$$ However, by Theorem 1 of the quoted paper (which is essentially due to Gauss), each ambiguous class of discriminant $$d$$ contains exactly two ancipital forms with positive first coefficient, hence $$[1,0,-3p]$$ and $$[p,0,-3]$$ in the first line must be equivalent. Now $$[1,0,-3p]$$ trivially represents $$1$$, hence $$[p,0,-3]$$ also represents $$1$$. That is, the OP's equation $$(2)$$ has an integer solution.

Proof of Conjecture 2. Consider the fundamental discriminant $$d=8p$$. As $$p\equiv 3\pmod{4}$$, the generic characters for this discriminant are $$\bigl(\tfrac{\cdot}{3}\bigr)$$ and $$\bigl(\frac{-2}{\cdot}\bigr)$$, hence there are $$2^2/2=2$$ genera. Also, there are $$4$$ ancipital forms of discriminant $$d$$ and positive first coefficient, which belong to the various genera as follows.

If $$p\equiv 3\pmod{8}$$, then: $$[1,0,-2p]\quad\text{and}\quad[p,0,-2]\quad\text{belong to the signs}\quad ++$$ $$[2p,0,-1]\quad\text{and}\quad[2,0,-p]\quad\text{belong to the signs}\quad --$$

If $$p\equiv 7\pmod{8}$$, then: $$[1,0,-2p]\quad\text{and}\quad[2,0,-p]\quad\text{belong to the signs}\quad ++$$ $$[2p,0,-1]\quad\text{and}\quad[p,0,-2]\quad\text{belong to the signs}\quad --$$ As in the proof of Conjecture 1, each ambiguous class of discriminant $$d$$ contains exactly two ancipital forms with positive first coefficient, hence $$[1,0,-2p]$$ must be equivalent to $$[p,0,-2]$$ (resp. $$[2,0,-p]$$) when $$p\equiv 3\pmod{8}$$ (resp. $$p\equiv 7\pmod{8}$$). Now $$[1,0,-2p]$$ trivially represents $$1$$, hence $$[p,0,-2]$$ (resp. $$[2,0,-p]$$) also represents $$1$$ when $$p\equiv 3\pmod{8}$$ (resp. $$p\equiv 7\pmod{8}$$). As $$\left(\frac{2}{p}\right)=-1$$ when $$p\equiv 3\pmod{8}$$, and $$\left(\frac{2}{p}\right)=+1$$ when $$p\equiv 7\pmod{8}$$, we conclude that the OP's equation $$(3)$$ has an integer solution.

Proof of Conjecture 3. I will only use that $$p,q\equiv 3\pmod{4}$$. Note that if we switch $$p$$ and $$q$$, the quadratic residue symbol $$\left(\frac{p}{q}\right)$$ changes to its negative, hence the solvability of the OP's equation $$(4)$$ remains unchanged. Therefore, without loss of generality, $$\left(\frac{p}{q}\right)=1$$, and we need to show that $$[p,0,-q]$$ represents $$4$$. Equivalently, after a simple change of variables, $$[p,p,(p-q)/4]$$ represents $$1$$. Consider the fundamental discriminant $$d=pq$$. The generic characters for the discriminant $$d$$ are $$\bigl(\frac{\cdot}{p}\bigr)$$ and $$\bigl(\frac{\cdot}{q}\bigr)$$, hence there are $$2^2/2=2$$ genera. Also, there are $$4$$ ancipital forms of discriminant $$d$$ and positive first coefficient, which belong to the various genera as follows: $$[1,1,(1-pq)/4]\quad\text{and}\quad[p,p,(p-q)/4]\quad\text{belong to the signs}\quad ++$$ $$[pq,pq,(pq-1)/4]\quad\text{and}\quad[q,q,(q-p)/4]\quad\text{belong to the signs}\quad --$$ As in the proof of Conjecture 1, each ambiguous class of discriminant $$d$$ contains exactly two ancipital forms with positive first coefficient, hence $$[1,1,(1-pq)/4]$$ and $$[p,p,(p-q)/4]$$ in the first line must be equivalent. Now $$[1,1,(1-pq)/4]$$ trivially represents $$1$$, hence $$[p,p,(p-q)/4]$$ also represents $$1$$. That is, the OP's equation $$(4)$$ has an integer solution.

• Is ancipital a regular English word or a purely mathematical word? I couldn't find it in Word Reference. – Sylvain JULIEN Aug 14 '19 at 20:53
• @SylvainJULIEN: The meaning and etimology of "ancipital" is explained on the first page of the quoted paper. – GH from MO Aug 14 '19 at 21:53
• Indeed, thank you. – Sylvain JULIEN Aug 15 '19 at 8:35
• To avoid confusion, for anyone without access: "In the Gaussian theory of integral binary quadratic forms, a form $[a, b, c] = ax^2 + bxy+cy^2$ is called ambiguous if $a \mid b$; and an ambiguous class is one which contains an ambiguous form. As is well known, the primitive ambiguous classes are those which are self-inverse under composition. For the sake of brevity we will write class and form hereafter to mean primitive class and form. The term ambiguous was a translation of Gauss’s term anceps. We will borrow this word and call the forms $[a, 0, c]$ or $[a, a, c]$ ancipital." – LSpice Oct 21 '19 at 1:07
• The paper itself is at Pall - Discriminantal divisors of binary quadratic forms (MSN). – LSpice Oct 21 '19 at 1:08