Complex Extensions, The xyn Lemma

xj + yn = zn

Assume n and j are greater than 1. If j = n and n = 2, this is a pythagorean triple. If j = n and n > 2, this is a fermat triple.

Assume the variables are coprime. This may be a given, or, if n is a multiple of j, you can invoke the coprime lemma.

Let d = z-y, and replace z with y+d. Then pull yn to the right hand side and write it this way.

xj = (y+d)n - yn

Expand (y+d)n by the binomial theorem. The terms yn cancel, leaving something like this.

xj = ndyn-1 + (n:2)d2yn-2 + (n:3)d3yn-3 + … ndn-1y + dn

Let p be a prime. If pk divides d, p2k divides all but the first term on the right. If the first term, ndyn-1, has fewer factors of p than all the others, then it sets the tone for the right side of the equation, and for xj.

How many times does p divide ndyn-1? By definition, pk divides d. We know p does not divide y, else it would also divide z.

Assume p and n are coprime. The first term, ndyn-1, is precisely divisible by pk, not pk+1. The same can be said for the entire right hand side, and for xj. Therefore k is a multiple of j.

So far, d is a perfect jth power.

Next assume pr divides n, with p odd. Again, pk divides d. We still want to show that ndyn-1 sets the tone for the right hand side.

The first term has r+k powers of p, the second r+2k, and the third r+3k etc. Each additional instance of d introduces another k powers of p, but watch the binomial coefficients. We bring in n-1 on top and 2 on the bottom; then n-2 on top and 3 on the bottom etc. As a worst case, assume the numerator never brings in any additional factors of p. The ever expanding denominators pull one out at the pth term, another at term 2p, another at 3p, and two factors are removed at term p2, and so on. After w terms we have removed w/p + w/p2 + w/p3 … factors of p. This is w times 1 less than the geometric series 1/p + 1/p2 + 1/p3 etc. The series becomes 1/(1-1/p), or p/(p-1). Subtract 1 to get 1/(p-1). So the denominators remove at most w/(p-1) factors of p from the wth term. Of course this is a worst case - an upper bound. Since p > 2, the denominators pull out at most ½w factors of p, while the powers of d bring in at least k(w-1) new factors of p. Even if k = 1, this is certainly larger than ½w. The powers of p keep growing, all the way to dn.

When p = 3 and k = 1 we need to verify the second term by hand. The formula says we might be removing one factor of p, that is, 2/(3-1) = 1. And d might only bring in one factor of p, when k = 1. It looks like the second term and the first could both be divisible by pk+r. In fact this can't happen, because the second denominator is 2, and that doesn't include any factors of 3. The second term, (n:2)d2yn-2, has more factors of p than the first term, ndyn-1, and subsequent terms have even more factors of p. The first term sets the tone for the entire sum, and k+r is a multiple of j.

This reasoning breaks down when p = 2; if d is even we can only hope n is odd, so that p and n are coprime.

Shared Primes

What if x y and z are not coprime? Let p divide all three variables. At the end of the coprime lemma, we proved that the same power of p divides yn and zn, hence the same power of p divides y and z. Call this pr.

Now pr, or something larger, divides into d. Assume pr+k goes into d. In other words, d has more factors than y. Each term brings in another d, and takes away a y. Each term introduces another pk. Yet this is precisely what we saw before. The first term, ndyn-1, sets the tone for the right hand side, and for xj. Relative to p, d is a jth power, divided by the factors of p in nyn-1.

It's not clear when this would be used, so return to the assumption that all variables are coprime.

n an odd prime

For the rest of this page, let n be an odd prime. Now p is either equal to n, or it is coprime to n. And (by assumption) p is coprime to y. Thus d, or z-y, is either a perfect jth power, or it is a jth power divided by n.

xn + yn = zj

Since n is odd, we can show x+y is a jth power, or a jth power divided by n.

Let d = x+y, replace y with d-x, expand by the binomial theorem, and let the terms xn cancel.

ndxn-1 - (n:2)d2xn-2 + (n:3)d3xn-3 - … dn = zj

The alternating sum on the left is led by ndxn-1, which sets the tone. Reasoning as above, d becomes a jth power, or a jth power divided by n.

Separating z

Continuing the above, let d = uj, or perhaps uj/n. The left side is divisible by d, and so is the right, which is zj. If uj divides zj, then u divides z. (You can show this prime by prime.)

Let z = u×v, and suppose u and v have a prime factor p in common. Thus zj, without uj, has at least j factors of p. On the left side, pull d out. What remains has at least j factors of p. Since p divides d, it must also divide the first term, the only term without d, namely nxn-1. If p divides x then x and z are not coprime. so p divides n, i.e. p = n. Now we can divide out another factor of p. Each binomial coefficient has one factor of p. And the last term, dn-1, certainly has factors of p to spare. Now the first term is a power of x, and everything beyond this is still divisible by d. And we have at least j-1 factors of p to account for. Thus p divides x, which is a contradiction. Therefore u and v are coprime.

We know uj = x+y, or x+y times n. Can we say anything about v?

Let p be a prime dividing v. Thus p divides xn+yn, but it does not divide x+y. In other words, xn = -yn = (-y)n mod p, but x is not equal to -y mod p. The ratio x over -y is not 1, but when raised to the n, we get 1. this means p-1 is a multiple of n, or if you prefer, p = 1 mod n. This holds for all primes in v, and v = 1 mod n.

xn + yn = zn

In a fermat triple, where j = n, x+y, z-x, and z-y are all perfect nth powers, or perhaps one of them is an nth power divided by n. Hence I refer to this as the xyn lemma.

This gives you an idea of how difficult it is to build a fermat triple. The variables must yield nth powers when added and subtracted, and beyond this, xn+yn is suppose to equal zn. We're not surprised there are no such triples, although this does not constitute a proof.

Divisibility by 3 or 5

Start with the fermat triple xn + yn = zn, where n is an odd prime. Let d = z-y. Replace z with y+d and expand, as we did above. Then move dn to the left to get this.

xn - dn = ndyn-1 + (n:2)d2yn-2 + … + (n:2)dn-2y2 + ndn-1y

Suppose n does not divide x y or z. Each binary coefficient is divisible by n, hence the right side is divisible by n, hence xn = dn mod n.

Raising to the nth doesn't change a thing mod n, so x = d mod n.

consider the multiplicative group of units mod n2. This is Zn*Zn-1. Raising x to the nth power multiplies the log of x by n within this group. The first component drops to 0, and the second component is unchanged. Since x = d mod n, xn = dn mod n2. The right side of our equation is divisible by n2.

By assumption, n does not divide y. Since x is nonzero mod n, d is also nonzero mod n. In other words, n doesn't divide d either. Factor ndy out of the right side of the equation. What remains is divisible by n.

When n = 3 we are left with d+y. This is divisible by 3, yet z is not divisible by 3, so we have a contradiction. At least one variable in x3 + y3 = z3 is divisible by 3.

When n = 5 we find that 5 must divide y3 + 2dy2 + 2yd2 + d3.

Write this as y3+d3 + 2yd(d+y).

Since d+y = z, which is nonzero mod n, factor this out, leaving y2 + dy + d2. Divide through by y and set w = d/y to obtain 1 + w + w2 = 0. Since this is impossible mod 5, 5 divides x y or z.

Let's try this trick with n = 7.

y5 + d5 + 3dy(y3+d3) + 5d2y2(d+y)

Pull out y+d to get this.

y4 + 2dy3 + 3d2y2 + 2d3y + d4

Set d = 2y, and indeed it comes out 0. This approach doesn't work for all n.