Translate

Monday, December 22, 2014

My sum of squares discovery

Found a number theory iterator for quadratic Diophantine equations. It lets you find nonzero x and y, such that for an integer n equal to 0 or higher, and an integer m equal to 3 or higher:

x2 + (m-1)y2 = mn+1

-------------------------------

Here I have m raised to n+1 so n is a count of iterations.

Gave it a kind of funky name as wanted something cool, so decided to call it a Binary Quadratic Diophantine iterator, or BDQ iterator for short. And it's remarkably easy:

u2 + (m - 1)v2 = F

then it must also be true that

(u - (m - 1)v)2 + (m - 1)(u + v)2 = m*F

So if you start the iterator with u = v = 1, or u = v = -1, then F = m.

So, like if m - 1 is a square you have a sum of squares equal to this integer raised to the nth power. And the first case is with m = 5, so here's an example:

Start is:

12 + 4*12 = 5

then it must also be true that

(-3)2 + 4(2)2 = 25 = 52

Next iteration: (-11)2 + 4(-1)2 = 125 = 53

And third iteration: (-7)2 + 4(-12)2 = 625 = 54

Fourth iteration: (41)2 + 4(-19)2 = 3125 = 55

Fifth iteration: (117)2 + 4(22)2 = 15625 = 56

Sixth iteration: (29)2 + 4(139)2 = 78125 = 57

Oh yeah, so of course 4 can be pulled into the square. I keep it out to do the iterations, as in each case I'm getting each iteration by just going back to:

(u - 4v)2 + 4(u + v)2 = 5*F

So for instance at the fifth iteration u = 117, v = 22, and F = 56, and you plug those in and get the sixth one.

Pulling the 4 in with the fifth gives:

(117)2 + (44)2 = 15625 = 56

Gives you something to do if you're bored, and like playing with numbers. Or hey, I guess could be useful as a way to test out a math processor. Who knows. I LOVE finding these kinds of things for some reason. Helps keep the mind sharp, you know?


James Harris

No comments: