TITLE: Quadratic Diophantine equations with all values prime
QUESTION [5 upvotes]: Given a quadratic Diophantine equation over the integers in two variables, can we say much about when it has only finitely many solutions with the additional assumption that both variables are prime?
That is, given integers $a$, $b$, $c$, $d$, and $e$, $a$ and $c$ both non-zero. Then it seems reasonable to conjecture that there are only finitely many primes $x$ and $y$ with $$ax^2 +bxy +cy^2 + dx +ey + f=0,$$ barring the exceptional case where the left-hand side itself factors.
The obvious heuristic here is that solutions to the equation (whether or not they are prime) should grow roughly exponentially based on standard methods to solve quadratic Diophantine equation. Thus, if we call the $n$th solution, $(x_n,y_n)$ then the chance they are both prime should be $O(\frac{1}{\log k^n})=O(\frac{1}{n})$ (where $k$ is some constant). So the chance they are both prime is about $O(\frac{1}{n^2})$, and so the relevant series converges, since $\sum_{n \geq 1} \frac{1}{n^2}$ converges.
There are some cases where it is not hard to prove this sort of conjecture, using completely elementary methods.  For example, it is not hard to show the following:
Proposition: Suppose that $p$ is prime, $b \geq 1$, $m \geq 2$, $a \geq 1$, and $$p^2 + bp + ma^2 = mq^2.$$ Then $p \leq b + 4am$.
Proof sketch: The equation can be written as $$p(p+b)=m(q-a)(q+a)$$ and so $p$ needs to divide one of the terms on the right-hand side.
One interesting thing here is that in this case, we only need that $p$ is prime, which is stronger than what the above heuristic would suggest, since that heuristic uses both variables being prime, whereas here no assumption about the primality of $q$. (One can in this case also tighten the bound if one does do a little more work or if one also assumes that $q$ is prime.)
My guess is that answering this question in complete generality is going to be tough. So my question then is what broad sets of cases can we prove this for?

REPLY [2 votes]: here's one that puts up a good fight. The table can be extended readily with $w_{n+4} = 6 w_{n+2} - w_n$ and same for $v$
jagy@phobeusjunior:~$ ./Pell_Target_Fundamental 2 3 2 23 120
  Automorphism matrix:  
    3   4
    2   3
  Automorphism backwards:  
    3   -4
    -2   3

  3^2 - 2 2^2 = 1

 w^2 - 2 v^2 = 23 =  23

Sun Feb  7 13:49:34 PST 2021

1. w:  5 w=  5      v: 1  SEED   KEEP +-     v =    1 
2. w:  11 w=  11      v: 7  SEED   BACK ONE STEP  5 ,  -1    v =   7
3. w:  19 w=  19      v: 13    v =   13
4. w:  61 w=  61      v: 43    v =   43
5. w:  109 w=  109      v: 77    v =   7 11
6. w:  355 w=  5 71      v: 251    v =   251
7. w:  635 w=  5 127      v: 449    v =   449
8. w:  2069 w=  2069      v: 1463    v =   7 11 19
9. w:  3701 w=  3701      v: 2617    v =   2617
10. w:  12059 w=  31 389      v: 8527    v =   8527
11. w:  21571 w=  11 37 53      v: 15253    v =   7 2179
12. w:  70285 w=  5 14057      v: 49699    v =   13 3823
13. w:  125725 w=  5^2 47 107      v: 88901    v =   19 4679
14. w:  409651 w=  11 167 223      v: 289667    v =   7 41381
15. w:  732779 w=  67 10937      v: 518153    v =   518153
16. w:  2387621 w=  2387621      v: 1688303    v =   83 20341
17. w:  4270949 w=  4270949      v: 3020017    v =   7^2 11 13 431
18. w:  13916075 w=  5^2 19 29297      v: 9840151    v =   9840151
19. w:  24892915 w=  5 43 115781      v: 17601949    v =   17601949

Sun Feb  7 13:51:34 PST 2021

 w^2 - 2 v^2 = 23 =  23

5,  11,  19,  61,  109,  355,  635,  2069,  3701,  12059,  
21571,  70285,  125725,  409651,  732779,  2387621,  4270949,  13916075,  24892915,  

1,  7,  13,  43,  77,  251,  449,  1463,  2617,  8527,  
15253,  49699,  88901,  289667,  518153,  1688303,  3020017,  9840151,  17601949,  

jagy@phobeusjunior:~$