## Thursday, May 29, 2014

### Sum and squares

Given x2 - Dy2 = 1, you can get to some really cool equations using elementary methods, valid for the special cases x = 1 or -1 mod D.

Using those equations, you can get a result involving a sum, which is x+y, and squares:

x+y = n2 + (D-1)m2

Or:

2(x+y) = n2 + (D-1)m2

for some integers n and m.

I've recently explained in a post how to calculate n and m when you know x and y.

James Harris

## Tuesday, May 27, 2014

### When only integers will do

The word Diophantine is in honor of Diophantus and means integer, so Diophantine equations are ones that have integer solutions. But just because we as human beings specify integer, it does not necessarily mean that the math is limited to them.

For instance x+y = 1, can have x = y = 0.5 as a solution. And simply saying 'Diophantine' does not necessarily force it beyond human choice. So it is fascinating to me when you DO have situations when only integers will do. That is, when the math will not allow anything but integers.

Given x2 - Dy2 = 1, you can get to some really cool equations using elementary methods, valid only for special cases when x = 1 or -1 mod D.

For the x = 1 mod D case:

(D-1)j2 + (j+1)2 = (x+y)2, where j = ((x+Dy)-1)/D

I've shown that

(x+y + j+1) = n2 or 2n2, for some integer n, and:

(x+y - (j+1)) = (D-1)m2 or 2(D-1)m2, for some integer m.

And it is required that j = nm or j = 2nm.

Further either: (n-m)2 - Dm2 = 2, or (n-m)2 - Dm2 = 1

And for the x = -1 mod D case:

(x+y + j-1) = n2 or 2n2, for some integer n.

And (x+y - (j-1)) = (D-1)m2 or 2(D-1)m2, for some integer m.

And again, it is required that j = nm or j = 2nm.

While this time either: (n-m)2 - Dm2 = -2, or (n-m)2 - Dm2 = -1

--------------------------------------------------------------
To understand why those conclusions require integers you have to study the derivation. I think it's fascinating as I noticed a situation where a square is forced by some simple requirements. The trick is that I was able to specify prime p needing to be a factor of D-1, which told the math what I wanted.

For an example with numbers, with D=61, you have some well-known solutions.

x = 1766319049, y = 226153980, so x = 1766319049 = -1 mod 61.

And you get j = 255110030, and can calculate n and m where I'll get one set using positive solutions to the square root (the negative solutions have to work as well):

n = sqrt((x+y+j-1)/2) = 33523,

m = sqrt((x+y-(j-1))/(2(D-1))) = 3805.

It's worth noting that: (n-m)2 - 61m2 = -1, with numbers:

297182 - 61*38052 = -1

This example is great for seeing a case where the math knows that you only want integers! As the rule about squares is only true when you are dealing with integers.

Turns out that human beings have found few such situations, and in many cases it takes human selectivity to only look at integers when the math does not care. But sometimes the math DOES care, and is a brilliant partner in the Diophantine search.

As a partner the math has infinite intelligence, which is something we human beings cannot, as finite creatures, completely understand. But the math doesn't care about that either.

It's actually kind of freaky. And a mental exercise is trying to find an error in my conclusion that only integers are allowed. Then wonder: how does the math do it?

And contemplate that the math covers infinity, which can make you feel really appropriately small.

So to get integers only above the math has to consider an infinite number of results!

No human can compete in that arena.

James Harris

## Friday, May 23, 2014

### Getting n and m

Looking through some of my posts recently I found myself thinking more on certain research, which is necessary to show how easy it is to keep going to infinity if you have solutions to x2 - Dy2 = 1, where x = 1 mod D or x = -1 mod D.

So I'm echoing things already discussed on the blog, but pulling out particular things to highlight.

Given x2 - Dy2 = 1, and x = 1 mod D or x = -1 mod D:

(D-1)j2 + (j+1)2 = (x+y)2, where j = ((x+Dy)-1)/D

or

(D-1)j2 + (j-1)2 = (x+y)2, where j = ((x+Dy)+1)/D

which gives a Pythagorean triple when D-1 is a square. The condition that x = 1 mod D or x = -1 mod D is always true if D is prime or twice a prime. For other cases though, when that requirement is not met, the following analysis does not apply.

Starting with the first relation I note that:

(j+1)2 - (x+y)2 = 0 mod D-1

Now consider any prime factor p of D-1, of course it also follows then that:

(j+1)2 - (x+y)2 = 0 mod p

But now consider j = ((x+Dy)-1)/D, and since D-1 = 0 mod p, I have j = x+y-1 mod p, which forces all prime factors of D-1 into: (j+1 -(x+y)).

Going back to my original full expression:

(D-1)j2 + (j+1)2 = (x+y)2, which is, (D-1)j2 = (x+y - (j+1))(x+y + (j+1))

From the original equation itself I have x2 - y2 = 1 mod p, so x+y must be coprime to D-1. And knowing that D-1 is a factor of (x+y - (j+1)), it must be coprime to (x+y + j+1) for all its primes except 2. Also then (x+y + j+1) is forced to be a perfect square or twice a perfect square.

So I have (x+y + j+1) = n2 or 2n2, for some integer n.

And (x+y - (j+1)) = (D-1)m2 or 2(D-1)m2, for some integer m.

That applies if x = 1 mod D.

Going to the other possibility, which is x = -1 mod D:

x+y + 2nm + 1 = 2n2, and x+y - (2nm+1) = 2(D-1)m2

and again subtracting the last from the first gives: 2(2nm+1) = 2n2 - 2(D-1)m2.

So n2 - 2nm - 1 - (D-1)m2 = 0, which gives, (n-m)2 - Dm2 = 1, which is the original equation back again, and I can solve for n to get:

n = m +/- sqrt(Dm2 + 1)

Those are just 2 of 4 possibles though, as (D-1)j2 + (j-1)2 = (x+y)2, then for the x = -1 mod D case gives:

(x+y + j-1) = n2 or 2n2, for some integer n.

And (x+y - (j-1)) = (D-1)m2 or 2(D-1)m2, for some integer m.

Originally I went down this path thinking it might lead to an easy general way to solve the original equation, but didn't notice one which is kind of how it fell to the side.

But more recently I've noted that you can use solutions for x and y to get more solutions to another Diophantine equation.

For instance with D=61:

x = 1766319049, y = 226153980, so x = 1766319049 = -1 mod 61.

Then j = 255110030.

And taking the positives with some square roots though I'm sure you can do something with the negative values:

sqrt((x+y+j-1)/2) = 33523 = n

sqrt((x+y-(j-1))/(2(D-1))) = 3805 = m

Notice that j = 2nm.

And (n-m)2 - 61m2 = -1.

297182 - 61*38052 = -1

The above complements another post which explains more, where I mention that you can get infinite cycles but didn't show how you calculate n and m. So the point of this post is to show how they are calculated.

And you know it is kind of wild to have that from my own original research.

Of course the math doesn't care. The results have always been true. It was just a matter of someone finding them.

James Harris

## Tuesday, May 13, 2014

One of my most important simple results is really useful for confidence, especially if you are facing down detractors as you can do so much with it.

Starting from the basic reduced binary quadratic form:

u2 + Dv2 = F

the simple result is:

(u-Dv)2 + D(u+v)2 = F(D+1)

One of the most stunning simple results in all of mathematics.

Notice you get back the reduced binary quadratic form! So it is iterative.

And in fact, shows you how in general to connect a binary quadratic form to an infinity of other binary quadratic forms.

So there is in general this infinite web of binary quadratic Diophantine equations--linked together. Its impact reaches across vast stretches of number theory. I ponder that result and ponder.

That is found from my method for reducing binary quadratic Diophantine equations.

That beautiful simple relation is used by me quite a bit and you can see it pop up in a lot of my more popular posts!

Its power and reach are vast but it can be demonstrated simply with well-known equations.

Plugging in values, let F = 1, u=x, v=y, and D = -2.

Start: x2 - 2y2 = 1

Iterations:

1. (x+2y)2 - 2(x+y)2 = -1

2. (3x+4y)2 - 2(2x + 3y)2 = 1

3. (7x + 10y)2 - 2(5x + 7y)2 = -1

4. (17x + 24y)2 - 2(12x + 17y)2 = 1

and you can keep going out to infinity, but I'll stop with 4 iterations.

Notice you get solutions with x=1 and y = 0:

Start: 12 = 1

1. (1)2 - 2(1)2 = -1

2. (3)2 - 2(2)2 = 1

3. (7)2 - 2(5)2 = -1

4. (17)2 - 2(12)2 = 1

The solidity of exactness is so comforting. Perfection.

You can actually verify the result by just multiplying out and simplifying:

(u-Dv)2 + D(u+v)2 = F(D+1)

Which is kind of fun, and if you do it, you'll find it just reduces back to the original:

u2 + Dv2 = F

So if you run into someone trying to convince you negative things about me you can challenge them to explain the above, and you can wonder why it's not in mainstream literature.

I know I do.

Criticism is easy--people can say anything. But the math does not lie.

Want to see it used with something more complicated? Then check out the link below:

Connecting Diophantine hyperbola to ellipse

James Harris

## Monday, May 05, 2014

### View on mobile

Blog is formatted for viewing on a mobile device.

From my own experience it comes up by its name in search most consistently on Google.

Try to find through Google with the search: some math