1

How can I find the integer solutions of the generalized Pell equation $x^2-2y^2=49$

I have an algorithm, but this only works if $D\ge r^2+\frac{\left(|r|+1\right)}2$, (where $x^2-Dy^2=r^2$).

The problem is we've covered Pell equation and elementary number theory a couple of weeks ago, since then we're doing some algebraic number theory, but I cannot find any useful theorems there.

One solution by guessing is $(r,s)=(11,6)$ and the minimal solution to $x^2-2y^2=1$ is $(t,u)=(3,2)$ and then a second solution can be found $(x,y)=(rt+Dsu,ru+st)=(57,40)\dots$, but these are not all, am I wrong ?

OBDA
  • 1,715

2 Answers2

4

There is a method which gives all solutions, presented in CONWAY, chapter I. It is quick enough for targets of modest absolute value such as $49.$ The $(x,y)$ pairs in Conway's diagram are given more attention in STILLWELL, especially pages 87-100. I put those, as column vectors, in black in the first diagram, then light green in the second diagram.

To get quickly to the end, there are three families of solutions $$ (7,0), \; (21,14), \; (119,84), \; (693, 490), $$ $$ (9,-4), \; (11,6), \; (57,40), \; (331, 234), $$ $$ (9,4), \; (43,30), \; (249,176), \; (1451, 1026), $$ In all three cases there are linked recursions $$ x_{n+1} = 3 x_n + 4 y_n, $$ $$ y_{n+1} = 2 x_n + 3 y_n. $$

These give, by Cayley-Hamilton, separate recursions, $$ x_{n+2} = 6 x_{n+1} - x_n. $$ $$ y_{n+2} = 6 y_{n+1} - y_n. $$

enter image description here enter image description here

Will Jagy
  • 139,541
1

For a fast and simple algorithm to solve the generalised Pell equation $$ x^2-Dy^2=N, $$ with $D>0$ not a square, and nonzero integer $N$, see the article Solving the generalized Pell equation $x^2 − Dy^2 = N$ by John P. Robertson. It gives several algorithms and online solvers (if you do not have software), among them the PQa algorithm and LMM algorithm.

Dietrich Burde
  • 130,978