Given x

^{2}- Dy

^{2}= 1, and x = 1 mod D or x = -1 mod D, from the prior post I reference above I have that

(D-1)j

^{2}+ (j+1)

^{2}= (x+y)

^{2}

or

(D-1)j

^{2}+ (j-1)

^{2}= (x+y)

^{2}

where

j = ((x+Dy)-1)/D or j = ((x+Dy)+1)/D

which gives a Pythagorean triple whenever D-1 is a square, for instance with D=2, I have a solution with x=17, y=12, as 17

^{2}- 2(12)

^{2}= 1, so

j = ((17+2(12))-1)/2 = 20 is a solution giving:

20

^{2}+ 21

^{2}= 29

^{2}

Notice that different types of Pythagorean triples are included as D increases in size, as for instance, with D=5, you have triples of the form:

(2j)

^{2}+ (j+/-1)

^{2}= (x+y)

^{2}

(where I use "+/-" as an OR as above as it's less tedious)

so given a solution to x

^{2}- 5y

^{2}= 1, you have solutions.

e.g. x=9, y = 4, works as 9

^{2}- 5(4)

^{2}= 1, so j = (9 + 5(4) + 1)/5 = 6 is a solution. And then

12

^{2}+ 5

^{2}= 13

^{2}.

Notice too that when D-1 is not a square you get integer solutions to ellipses, and you also get the result that with a natural number n, there are always an infinity of integer, non-zero solutions to the equation: nu

^{2}+ v

^{2}= w

^{2}

The question now arises, can you go in the other direction and solve for a Pell's equation using a Pythagorean triple?

The answer is, yes. Consider, 24

^{2}+ 7

^{2}= 25

^{2}.

If 7 is j+/-1, I can try j = 6 or 8, and find D=17 or D=10.

With j=6, D=17, I have j = ((x+Dy) -/+1)/D, so

17(6) = x+17y -/+ 1, so x+17y = 17(6)+/-1, and x+y = 25, so

16y = 17(6)+/-1 - 25, which doesn't give an integer y.

But trying j=8, D=10:

x+10y = 10(8)+/-1, so 9y = 10(8)+/-1 - 25, gives y = 6 as a solution, so x = 19, and

19

^{2}- 10(6)

^{2}= 1.

So you can go in either direction.

Which then proves an infinite number of solutions to the more general form of Pell's Equation.

James Harris