# 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 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 at 14:00
• Prof. Ping-Zhi Yuan has just told me that he could prove Conjecture 2. – Zhi-Wei Sun Aug 14 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 at 15:35

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. Done.