# Database of solutions to this generalised Pell equation.

Does there exist a database of primary solutions to generalised Pell's equations of the form:

$$x^2 - 2w^2 = -N$$

for every constant $$N \in \mathbb{Z}$$?

• no. For $\pm 1$ there is just one seed answer, all the rest produced by automorph. For prime $N,$ two seeds, some (a,b) and (a,-b) with positive a,b. As $N$ gets more prime factors $\pm 1 \pmod 8$ the number of seeds goes up. See bookstore.ams.org/mbk-105 by Weissman, good for self study. Jul 3, 2020 at 18:53
• Wouldn't that be essentially the same as a database of primary solutions to $x^2-2w^2=\color{red}+N$ for every $N\in\mathbb Z$? Jul 3, 2020 at 19:04
• Not that I know of. But it wouldn't be hard to make one, or to compile a list of solutions. What aspects are you interested in from a database? Jul 3, 2020 at 23:48
• I just need a way to quickly look up some solutions. They don't have to be primitive or any particular solutions, I just need some solutions. Jul 4, 2020 at 9:17

The tree diagrams below, if extended out enough layers, show all your "primary" solutions for $$x^2 - 2 y^2 = n$$ with $$n>0$$ and $$\gcd(x,y) = 1.$$ Note that this means $$n$$ cannot be divisible by $$4,$$ nor by $$3,5,11,13$$ or any primes $$q$$ with $$q \equiv 3,5 \pmod 8.$$ As far as the test case $$n=119,$$ two primary solutions are small enough to appear in these trees, the other two "seed" solutions are just a bit too big. This method was introduced by J. H. Conway and is written up in more recent books as well, I like Weissman's An Illustrated Theory of Numbers.

Oh, well. In the following, the full set of solutions to $$w_n^2 - 2 v_n^2 = 119$$ follows $$w_{n+8} = 6 w_{n+4} - w_n$$ $$v_{n+8} = 6 v_{n+4} - v_n$$ For instance $$6 \cdot 37 - 11 = 211$$ and $$6 \cdot 25 - 1 = 149$$

jagy@phobeusjunior:~\$ ./Pell_Target_Fundamental  Automorphism matrix:
3   4
2   3
Automorphism backwards:
3   -4
-2   3

3^2 - 2 2^2 = 1

w^2 - 2 v^2 = 119 =  7 17

Fri Jul  3 11:57:01 PDT 2020

w:  11  v:  1  SEED   KEEP +-
w:  13  v:  5  SEED   KEEP +-
w:  19  v:  11  SEED   BACK ONE STEP  13 ,  -5
w:  29  v:  19  SEED   BACK ONE STEP  11 ,  -1
w:  37  v:  25
w:  59  v:  41
w:  101  v:  71
w:  163  v:  115
w:  211  v:  149
w:  341  v:  241
w:  587  v:  415
w:  949  v:  671
w:  1229  v:  869
w:  1987  v:  1405
w:  3421  v:  2419
w:  5531  v:  3911
w:  7163  v:  5065
w:  11581  v:  8189
w:  19939  v:  14099
w:  32237  v:  22795
w:  41749  v:  29521
w:  67499  v:  47729
w:  116213  v:  82175
w:  187891  v:  132859
w:  243331  v:  172061
w:  393413  v:  278185
w:  677339  v:  478951
w:  1095109  v:  774359
w:  1418237  v:  1002845
w:  2292979  v:  1621381
w:  3947821  v:  2791531
w:  6382763  v:  4513295
w:  8266091  v:  5845009
w:  13364461  v:  9450101
w:  23009587  v:  16270235

Fri Jul  3 11:58:02 PDT 2020

w^2 - 2 v^2 = 119 =  7 17