## Monday, January 05, 2015

### Considering product of sum of squares

Found this post on mathoverflow which I figured would be fun as another easy result to be had with my BQD Iterator.

(I answered the question there and can no longer find it, so must assume my answer was deleted.)

Editing May 28, 2016: What follows does work to give solutions but have my doubts it gives a complete solution which is important. I am certain I DID find a general way to get infinite sets of solutions. The word "complete" does matter here though. Am studying this thing, but will note my confidence is shaken. Trouble with coming back later, and wondering. Oh yeah, someone questioned me on a more recent post where I refer back to this one, which got me to puzzling. Why do I think I have a proof here of a complete solution?

The poster asked for a complete solution to the Diophantine equation:

(x2 + ay2)(u2 + bv2) = p2 + cq2

And I already know that I can find integers for the following.

(x2 + ay2) = f1(a+1)n, (u2 + bv2) = f2(b+1)n

So I need: p2 + cq2 = f1f2(a+1)(b+1) to have solutions.

That forces (a+1)(b+1) = c+1, so c = (a+1)(b+1) - 1 = ab + a+b

Oh yeah, since c = ab + a+ b, that means if 'a' and 'b' are coprime then 'c' is as well. Easy. Fun!

But also it is required that: p02 + cq02 = f1f2

Which means p0 and q0 must exist such that:

p02 + (ab + a+b)q02 = f1f2

Oh yeah, I know that: f1 = x02 + ay02

And f2 = u02 + bv02

So: p02 + (ab + a+b)q02 = (x02 + ay02)(u02 + bv02)

Interesting. So for an infinite set of solutions that Diophantine equation must have solutions. If it does, then rest is easy, and it will have solutions for a given 'a' and 'b' if you set all other variables to 1, or -1, and then you can simply iterate to get more solutions. And get every possible by varying signs at each iteration.

Here are two of the BQD iterators, given:

x2 + ay2 = f1

then it must also be true that

(x - av)2 + a(x + y)2 = (a+1)*f1

And you start the iterator with f1 = x02 + ay02, which is easy enough.

Next one is:

u2 + bv2 = f2

then it must also be true that

(u - bv)2 + b(u + v)2 = (b+1)*f2

And you start the iterator with f2 = u02 + bv02. You can figure out the third iterator easily from the pattern shown.

Let's try some numbers! See if I did my math right.

Luckily see an easy path with a = 2, b = 3, which gives c = 11, and get 1 as a possible solution for all the others.

Then:

(x2 + 2y2)(u2 + 3v2) = p2 + 11q2

And the base passes ok, where all variables equal 1, so let's look at the first iteration.

Then x = -1, y = 2, u = -2, v = 2, p = -10, q = 2.

((-1)2 + 2(2)2)((-2)2 + 3(2)2)= (-10)2 + 11(2)2

Which is: (9)(16) = 144

Works!

Next iteration gives: x = -5, y = 1, u = -8, v = 0, so need to switch signs, using u = 2 from the prior iteration, u = -4, v = 4,  p = -32, q = -8

((-5)2 + 2(1)2)((-4)2 + 3(4)2)= (-32)2 + 11(-8)2

Which is: (27)(64) = 1728

Actually looks like you can always find solutions with a given 'a' and 'b' as I did above, by setting other variables to 1, and it is a complete solution as you can get all possible solutions by varying signs as you iterate.

It was an interesting experiment to see what would happen if I answered. Don't regret trying.

That wasn't completely not fun. So there's this kind of complicated looking Diophantine equation which is the control equation. I like control equations. Kind of a funky solution but sort of interesting.

James Harris