In [Question 337879](https://mathoverflow.net/questions/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?


Your comments are welcome! 



Is the diophantine equation $3x^2+1=py^2$ always solvable for each prime $p\equiv 13\pmod{24}$?
**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.


