TITLE: Find all prime solutions of equation $5x^2-7x+1=y^2.$
QUESTION [10 upvotes]: Find all prime solutions of the equation $5x^2-7x+1=y^2.$
It is easy to see that 
$y^2+2x^2=1 \mod 7.$ Since $\mod 7$-residues are $1,2,4$ it follows that $y^2=4 \mod 7$, $x^2=2 \mod 7$  or $y=2,5 \mod 7$ and $x=3,4 \mod 7.$ 
In the same way from $y^2+2x=1 \mod 5$ we have that $y^2=1 \mod 5$ and $x=0 \mod 5$ or $y^2=-1 \mod 5$ and $x=4 \mod 5.$
How put together the two cases?
Computer find two prime solutions $(3,5)$ and $(11,23).$

REPLY [2 votes]: Completing the square and dividing by $5$, we have 
$$ (10 x - 7)^2 - 20 y^2 = 29$$
Thus $z = 10 x - 7$ and $w = 2 y$ are solutions of the Pell-type equation
$$ z^2 - 5 w^2 = 29$$
The positive integer solutions of this can be written as
$$\pmatrix{z\cr w\cr} = \pmatrix{9 & 20\cr 4 & 9\cr}^n \pmatrix{7\cr 2\cr} \ \text{or}\ \pmatrix{9 & 20\cr 4 & 9\cr}^n \pmatrix{23\cr 10\cr}$$
for nonnegative integers $n$.
Now you want $w$ to be even and $z \equiv 3 \mod 10$.  All the solutions will have $w$ even, and $z$ altermately $\equiv \pm 3 \mod 10$.  Thus for $n$ even you get integers for $x,y$ with
$$ \pmatrix{z_n\cr w_n\cr} = \pmatrix{9 & 20\cr 4 & 9\cr}^n \pmatrix{23\cr 10\cr}$$
and for $n$ odd, 
$$ \pmatrix{z_n\cr w_n\cr} = \pmatrix{9 & 20\cr 4 & 9\cr}^n \pmatrix{7\cr 2\cr}$$
You do get primes for $n=0$ ($z_0 =  23, w_0 = 10, x_0 = 3, y_0 = 5$)
and $n=1$ ($z_1 = 103, w_1 = 46, x_1 = 11, y_1 = 23$).  In general,

$x_n \equiv 0 \mod 3$ for $n \equiv 0$ or $3 \mod 4$. 
$x_n \equiv 0 \mod 17$ for $n \equiv 2$ or $3 \mod 6$.  
$x_n \equiv 0 \mod 5$ or $y_n \equiv 0 \mod 5$ for $n \equiv 0,3, 4, 5, 6, 9 \mod 10$. 
$x_n \equiv 0 \mod 11$ for $n \equiv 1, 8 \mod 10$.
$x_n \equiv 0 \mod 13$ for $n \equiv 3, 5, 6, 7, 8, 10 \mod 14$.
$y_n \equiv 0 \mod 23$ for $n \equiv 1, 2, 5, 6 \mod 8$.

And every integer $n$ is in at least one of these classes.  We conclude there are no other prime solutions.