Integral solutions of a Diophantine equation Find some integral solution of the equation.
$$x^2+6xy-4y^2-4x-12y-19=0$$
What is the form of integral solution?
 A: Hint. The equation is equivalent to
$$(x-2+3y)^2-13y^2=23.$$
We can get a solution as soon as we find $y$ such that $y^2+23$ is a perfect square. Then
$$x = -3y+2\pm\sqrt{13y^2+23}.$$
For example for $y=1$, we have $(5,1)$, $(-7,1)$, and for $y=-1$ we get $(-1,-11)$, $(11,-1)$. For $y=\pm 431$ and $y=\pm 1739$ we can obtain more solutions (they are infinite!).
A: As $23$ is prime there are two similar linear recurrences that give all the values of $y,$ note that it is necessary to use both $\pm v$ form these:
In both cases of $u^2 - 13 v^2 = 23$ we get
$$ v_{n+2} = 1298 v_{n+1} - v_n   $$
$$  -1, \; 431, \; 559439, \; 726151391, $$
$$ 1, \; 1729, \; 2244241, \; 2913023089,  $$
jagy@phobeusjunior:~$  ./Pell_Target_Fundamental
  Automorphism matrix:  
    649   2340
    180   649
  Automorphism backwards:  
    649   -2340
    -180   649

  649^2 - 13 180^2 = 1

 u^2 - 13 v^2 = 23

Sun Jun  4 10:28:24 PDT 2017

u:  6  v:  1 ratio: 6  SEED   KEEP +- 
u:  1554  v:  431 ratio: 3.60557  SEED   BACK ONE STEP  6 ,  -1
u:  6234  v:  1729 ratio: 3.60555
u:  2017086  v:  559439 ratio: 3.60555
u:  8091726  v:  2244241 ratio: 3.60555

Sun Jun  4 10:29:24 PDT 2017

 u^2 - 13 v^2 = 23

jagy@phobeusjunior:~$

