With the Quadratic Diophantine Theorem derived, it makes sense to try it out with a well-known equation in Diophantine theory which is Pell's Equation:
x2 - Dy2 = 1
with D a natural number.
Now again, the Quadratic Diophantine Theorem:
Quadratic Diophantine Theorem:
In the ring of integers, given the quadratic expression
c1x2 + c2xy + c3y2 = c4z2 + c5zx + c6zy
where the c's are constants, for solutions to exist it must be true that
((c2 - 2c1)2 + 4c1(c2 - c1 - c3))v2 + (2(c2 - 2c1)(c6 - c5) + 4c5(c2 - c1 - c3))v + (c6 - c5)2 - 4c4(c2 - c1 - c3) = n2 mod p
for some n, where p is any prime coprime to z for a given solution, when
v = -(x+y)z-1 mod p.
So with Pell's Equation I have
c1 = 1, c2=0, c3 = -D, c4 = 1, c5 = 0, c6 = 0, and z=1
4Dv2 - 4D + 4 = n2 mod p
and v = -(x+y) mod p, so I have
4D(x+y)2 - 4D + 4 = n2 mod p
and since that must be true for all primes p, since z=1, I have in general that the left hand side must be a perfect square so it must be true then that
D(x+y)2 - D + 1 = S2
where S is some integer, and I have in general that
x+y = sqrt((S2 + D - 1)/D).
Example: From a reference I have that with D=2, x=17 and y=12 are solutions.
Working backwards I found that S=41 gives that solution, verifying the result.
Notice also that S2 = 1 mod D. It is of interest to consider the special case of S = 1 mod D or S = -1 mod D, and as that's tedious in what I follows I just use S = +/-1 mod D, where it's an OR, so both cases are not true.
So I can make the substitution S = jD +/- 1, to find
x+y = sqrt(Dj2 +/- 2j + 1)
x+y = sqrt((D-1)j2 + (j +/- 1)2)
and I have the existence of solutions related to another Diophantine relation of the form
(D-1)u2 + v2 = w2
with the condition that u = j and v = j+/-1.
For instance with D=2, I have that I need solutions to
u2 + v2 = w2
with u=j, and v=j+/-1, and j=20 works as 202 + 212 = 292, and gives x+y = 29, and again x=17, y=12 is a known solution to x2 - 2y2 = 1.
So then x2 - 2y2 = 1 is related to certain Pythagorean triples, when D is prime.
Also notice that from
x+y = sqrt((S2 + D - 1)/D)
S2 - D(x+y)2 = -D + 1
which means a second Diophantine equation connected to the first!
With D=2, I get then that x2 - 2y2 = 1, is connected to
S2 - 2(x+y)2 = -1
so for every solution of the first there is a solution of the second.
So there is an immediate result with the classical Pell's Equation, with little effort at all using the theorem, which can be used against any Diophantine quadratic in 2 variables, almost as easily, and also give results in 3 variables, though not quite as generally.