Monday, July 13, 2015

Fermat’s Last Theorem (n = 3 and n = 4)

History

After the French mathematician Pierre de Fermat died in the seventeenth century, a note written by Fermat was discovered in which he conjectured that there were no nonzero integer solutions to the equation xn + yn = zn for n > 2.  This proposition became known as Fermat’s Last Theorem. 


Fermat also wrote that he had “discovered a truly marvelous demonstration of this proposition that this margin is too narrow to contain,” but no proof could be found in any of his other notes.  At the time, though, this seemed trivial, because surely some other mathematician would find a proof for it.  But as years turned to decades, and decades turned to centuries, no general proof could be found.

The proof for Fermat’s Last Theorem became a Holy Grail for mathematics.  Like the Holy Grail, some mathematicians spent their lives trying to find a proof but came back empty-handed.  And like the Holy Grail, other mathematicians doubted its existence.  Perhaps Fermat’s Last Theorem was incorrect and so couldn’t be proved (although no counter-example could be found, either).  Perhaps Fermat didn’t actually have a proof, or perhaps he thought he had a proof but then realized later that it was incorrect and so never published it.  On the other hand, perhaps Fermat had a proof but there have been no mathematicians as great as him since to re-create his proof.  In any event, by the beginning of the twentieth century finding a general proof for Fermat’s Last Theorem became sweeter than just mathematical notoriety, because an industrialist named Wolfskehl bequeathed a prize of 100,000 German Marks to the first mathematician who could prove it.

Fermat’s Last Theorem: The Holy Grail of Mathematics

In the meantime, specific proofs were found for Fermat’s Last Theorem.  A proof from Fermat himself was discovered for the specific case of n = 4 (that there were no nonzero integer solutions to the equation x4 + y4 = z4).  Euler proved Fermat’s Last Theorem for n = 3 in 1770, over a hundred years after Fermat’s death.  Dirichlet and Legendre proved Fermat’s Last Theorem for n = 5 in 1825, nearly two hundred years after Fermat’s death. 

More and more specific proofs were found for greater and greater exponents, but it was not until 1995, over three hundred years after Fermat’s death, that Wiles published a general proof that included all exponents greater than two.  His proof is over one hundred pages long, and uses modern methods and techniques not available to Fermat (and beyond the scope of this article), so most mathematicians agree that this is probably not the proof Fermat had in mind back in the seventeenth century (if he even had one).

Wiles

Difficulties

One of the reasons why Fermat’s Last Theorem is so difficult to prove is because it has to be true for a certain set of numbers but false for another set of numbers.  First of all, Fermat’s Last Theorem only applies for nonzero integer solutions.  However, integer solutions to xn + yn = zn do exist for all exponents n as long as one of x, y, or z is equal to zero, for example, 13 + 03 = 13 or 24 + 04 = 24.

Secondly, Fermat’s Last Theorem also only applies for exponents greater than two.  Nonzero integer solutions to xn + yn = zn do exist for n = 1 and n = 2.  When n = 1, the formula becomes x + y = z, which has infinitely many nonzero integer solutions, for example, 3 + 4 = 7 or 5 + 12 = 17.  When n = 2, the formula becomes x2 + y2 = z2, which is the Pythagorean Theorem, and since it can be proved that all solutions to the Pythagorean Theorem are x = p2 – q2, y = 2pq, and y = p2 + q2 for any p and q (see here for a proof), an infinitely many combinations of nonzero integers p and q can be picked to generate nonzero integer solutions.  For example, if p = 2 and q = 1, then x = p2 – q2 = 22 – 12 = 3, y = 2pq = 2(2)(1) = 4, and z = p2 + q2 = 22 + 12 = 5, so x2 + y2 = z2 is 32 + 42 = 52.  Or for another example, if p = 3 and q = 2, then x = p2 – q2 = 32 – 22 = 5, y = 2pq = 2(3)(2) = 12, and z = p2 + q2 = 32 + 22 = 13, so x2 + y2 = z2 is 52 + 122 = 132.

Fermat’s Last Theorem for n = 3

Recall from above that Euler proved Fermat’s Last Theorem for n = 3 (that there are no nonzero integer solutions to x3 + y3 = z3) in 1770.  A few different ways to prove Fermat’s Last Theorem for n = 3 have been found, and a full proof, which is loosely based on the proof found on Freeman’s blog, can be found here

Summarizing the proof briefly, first assume that there are positive integer solutions to x3 + y3 = z3.  Then there must exist a cube in the form of 2p(p2 + 3q2) where p and q are relatively prime and where the greatest common factor of 2p and p2 + 3q2 is 1 or 3.  In either case, you can use the fact that all odd factors of p2 + 3q2 must also have that same form (proof for that here) to prove that there exists smaller positive integers x’, y’, and z’ in which x’3 + y’3 = z’3.  Since we can apply the same argument infinitely to obtain smaller and smaller positive integers, there is a contradiction by the method of infinite descent, and so we reject our assumption that there are positive solutions to x3 + y3 = z3.  We can also reject that there are any negative solutions to x3 + y3 = z3 because the formula can be rearranged to an all positive integer solution still in the same form.  Since there are no positive or negative solutions to x3 + y3 = z3, there are no nonzero integer solutions to x3 + y3 = z3.

Fermat’s Last Theorem for n = 4

Also recall from above that a proof for n = 4 (that there are no nonzero integer solutions to x4 + y4 = z4) was given by Fermat himself.  The specific case for n = 4 is actually easier than proving the specific case for n = 3, because a fourth power is a square of a square, so a Pythagorean solution can be found twice in such a way to produce a contradiction once again by the method of infinite descent.  A full proof for Fermat’s Last Theorem for n = 4 can be found here.


Fermat’s Last Theorem for n ≥ 5

Proving Fermat’s Last Theorem for n = 3 proves Fermat’s Last Theorem for n for all multiples of 3, and likewise proving Fermat’s Last Theorem for n = 4 proves Fermat’s Last Theorem for n for all multiples of 4.  For example, to prove that there are no nonzero integer solutions for n for all multiples of 3, or n = 3m, one can simply express x3m + y3m = z3m as (xm)3 + (ym)3 = (zm)3, a special case for n = 3; and to prove that there are no nonzero integer solutions for n for all multiples of 4, or n = 4m, one can simply express x4m + y4m = z4m as (xm)4 + (ym)4 = (zm)4, a special case of n = 4.  So a general proof for Fermat’s Last Theorem only requires a proof for n of all prime numbers greater than two.

It is tempting to use the proofs for n = 3 or n = 4 and apply them to the proofs for higher exponents, but unfortunately both proofs for n = 3 and n = 4 exploit properties that are unique for its exponent.  The proof for n = 3 uses a unique property that all odd factors of p2 + 3q2 must also have that same form.  But using the same logic as the proof for n = 3 on n = 5, we would need all odd factors of p4 + 10p2q2 + 5q4 to have the same form, but unfortunately this is simply not true, and the same can be said for higher exponents.  Furthermore, the proof for n = 4 uses the unique property that a fourth power is a square of a square, which is not true of any primes greater than two.  So a specific proof for any prime n ≥ 5 must use a completely different (and more difficult) approach altogether.

Conclusion

Even though Fermat’s Last Theorem was proved by Wiles in 1995, some mysteries remain.  Did Fermat really have a legitimate general proof for his theorem, or was he mistaken?  Will a general proof be found that is shorter or uses a traditional approach?  Perhaps it will take another three centuries to answer these questions.  If only Fermat’s margin was bigger!


Fermat’s Last Theorem (Proof for n = 4)

There are no nonzero integer solutions to x4 + y4 = z4

001
Assume x4 + y4 = z4, where x, y and z are nonzero integers.
002
Letting w = z2, we have x4 + y4 = w2.
003
Dividing out any common factors, there exists an X, Y, and W such that X4 + Y4 = W2 in which X, Y, and W are relatively prime.
004
Then (X2)2 + (Y2)2 = W2
005
Then there exists a Pythagorean solution for (X2)2 + (Y2)2 = W2, which is X2 = p2 – q2, Y2 = 2pq, and W = p2 + q2, where p, q and X are relatively prime.
006
Then there also exists a second Pythagorean solution for X2 = p2 – q2, which is X = m2 – n2, p = m2 + n2, and q = 2mn, where m and n are relatively prime.
007
Assume p and m are not relatively prime:
008
Then p = fP and m = fM
009
And n is also divisible by f since n2 = p – m2 = fP – (fM)2 = fP – f2M2 = f(P – fM2)
010
Then n and m have a common factor f.
011
But this contradicts that m and n are relatively prime.
012
So p and m are relatively prime.
013
Assume p and n are not relatively prime:
014
Then p = fP and n = fN
015
And m is also divisible by f since m2 = p + n2 = fP + (fN)2 = fP + f2N2 = f(P + fN2)
016
Then n and m have a common factor f.
017
But this contradicts that m and n are relatively prime.
018
So p and n are relatively prime.
019
Therefore, since m and n are relatively prime, and p and m are relatively prime, and p and n are relatively prime, that means p, m, and n are relatively prime.
020
Now  Y2 = 4pmn, because Y2 = 2pq = 2p(2mn) = 4pmn.
021
Since Y2 = 4pmn and p, m, and n are relatively prime, p, m, and n are squares, so p = w’2, m = x’2, and n = y’2
022
Substituting into p = m2 + n2, we have w’2 = (x’2)2 + (y’2)2, or x’4 + y’4 = w’2.
023
Now x’ < w since x’ is a factor of m which is a factor of q which (because W = p2 + q2) is less than W which a factor of w
024
And y’ < w since y’ is a factor of n which is a factor of q which (because W = p2 + q2) is also less than W which is a factor of w
025
And w’ < w since w’ is a factor of p which (because W = p2 + q2) is also less than W which is a factor of w
026
So there exists integers x’, y’, and w’ such that x’4 + y’4 = w’2 and 1 ≤ x’ < w, 1 ≤ y’ < w, and 1 ≤ w’ < w.
027
Therefore, if x4 + y4 = w2, there must exist other positive integers x’, y’, w’ such that 1 ≤ x’ < w, 1 ≤ y’ < w, and 1 < w’ < w in which x’4 + y’4 = w’2.
028
But we can use the same argument to prove the existence of more positive integers x”, y”, w” such that 1 ≤ x” < w’, 1 ≤ y” < w’, and 1 < w” < w’ in which x”4 + y”4 = w”2, and another x’”, y’”, w’”, and so on, so we have a contradiction by the method of infinite descent.
029
Therefore, there are no nonzero integer solutions to x4 + y4 = z4.

Q.E.D.

Fermat’s Last Theorem (Proof for n = 3)

There are no nonzero integer solutions to x3 + y3 = z3

001
Assume x3 + y3 = z3, where x, y and z are positive integers.
002
Then x < z and y < z.
003
Dividing out any common factors, there exists an X, Y, and Z such that X3 + Y3 = Z3 in which X, Y, and Z are relatively prime and X < Z and Y < Z.
004
Let f be the greatest common factor of x and y.
005
Then x = fX and y = fY.
006
And f divides into z since z3 = x3 + y3 = (fX)3 + (fY)3 = f3X3 + f3Y3 = f3(X3 + Y3)
007
So let z = fZ.
008
Therefore x3 + y3 = z3 is (fX)3 + (fY)3 = (fZ)3 which is f3X3 + f3Y3 = f3Z3 which is X3 + Y3 = Z3, where X and Y are relatively prime.
009
Assume X and Z are not relatively prime:
010
Then X = gX’ and Z = gZ’ where g > 1
011
Then g divides into Y since Y3 = Z3 – X3 = (gZ’)3 – (gX’)3 = g3Z’3 – g3X’3 = g3(Z’3 – X’3)
012
But this contradicts that X and Y are relatively prime.
013
So X and Z are relatively prime.
014
Assume Y and Z are not relatively prime:
015
Then Y = gY’ and Z = gZ’ where g > 1
016
Then g divides into X since X3 = Z3 – Y3 = (gZ’)3 – (gY’)3 = g3Z’3 – g3Y’3 = g3(Z’3 – Y’3)
017
But this contradicts that X and Y are relatively prime.
018
So Y and Z are relatively prime.
019
Since x < z then fX < fZ and X < Z.
020
Since y < z then fY < fZ and Y < Z.
021
Exactly one of X, Y, and Z are even, and the other two are odd.
022
Assume more than one of X, Y, and Z are even:
023
Then two of X, Y, and Z are divisible by 2.
024
But this contradicts that X, Y, and Z are relatively prime.
025
So it cannot be the case that more than one of X, Y, and Z are even.
026
Assume none of X, Y, and Z are even:
027
Then X, Y, and Z are all odd.
028
Since an odd number cubed is always an odd number, then X3, Y3, and Z3 are all odd.
029
But since an odd number plus an odd number is always an even number, Z3 which is X3 + Y3 must be an even number.
030
But Z3 cannot be an odd number and an even number at the same time, so there is a contradiction.
031
So it cannot be the case that none of X, Y, and Z are even.
032
Since more than one of X, Y, and Z cannot be even, and less than one of X, Y, and Z cannot be even, then exactly one of X, Y, and Z are even.
033
There exists integers u, p, and q such that u3 = 2p(p2 + 3q2) in which p is a positive integer and in which p and q are relatively prime and have opposite parity.
034
Since exactly one of X, Y, and Z are even, either X is even and Y and Z are odd, or Y is even and X and Z are odd, or Z is even and X and Y are odd.
035
Case 1: X is even and Y and Z are odd:
036
Then Z – Y is an odd number minus an odd number, which is even, so let Z – Y = 2p, where p is a positive integer.
037
And Z + Y is odd number plus an odd number, which is also even, so let Z + Y = 2q, where q is a positive integer.
038
Then Z = q + p, because Z = ½(2Z) = ½(Z + Z) = ½(Z + Z + Y – Y) = ½(Z + Y + Z – Y) = ½((Z + Y) + (Z – Y)) = ½(2q + 2p) = q + p.
039
And Y = q – p, because Y = ½(2Y) = ½(Y + Y) = ½(Y + Y + Z – Z) = ½(Z + Y – Z + Y) = ½((Z + Y) – (Z – Y)) = ½(2q – 2p) = q – p.
040
And if u = X, u3 = 2p(p2 + 3q2), because u3 = X3 = Z3 – Y3 = (q + p)3 – (q – p)3 = (q3 + 3q2p + 3qp2 + p3) – (q3 – 3q2p + 3qp2 – p3) = 6q2p + 2p3 = 2p(3q2 + p2) = 2p(p2 + 3q2).
041
Assume p and q are not relatively prime:
042
Then p = fP and q = fQ where f > 1.
043
And Z is divisible by f because Z = q + p = fQ + fP = f(Q + P).
044
And Y is divisible by f because Y = q – p = fQ – fP = f(Q – P).
045
So Z and Y have a common factor f.
046
But this contradicts that Z and Y are relatively prime.
047
So p and q are relatively prime.
048
Assume p and q are both even:
049
Then both p and q are divisible by 2.
050
But this contradicts that p and q are relatively prime.
051
So p and q cannot be both even.
052
Assume p and q are both odd:
053
Then Z = q + p is even, because an odd plus an odd makes an even.
054
But this contradicts that Z is an odd.
055
So p and q cannot be both odd.
056
Since p and q cannot be both even nor can p and q both be odd, p and q must have opposite parity.
057
So there exists integers u, p, and q such that u3 = 2p(p2 + 3q2) in which p is a positive integer and in which p and q are relatively prime and have opposite parity.
058
Case 2: Y is even and X and Z are odd:
059
Then Z – X is an odd number minus an odd number, which is even, so let Z – X = 2p, where p is a positive integer
060
And Z + X is odd number plus an odd number, which is also even, so let Z + X = 2q, where q is a positive integer.
061
Then Z = q + p, because Z = ½(2Z) = ½(Z + Z) = ½(Z + Z + X – X) = ½(Z + X + Z – X) = ½((Z + X) + (Z – X)) = ½(2q + 2p) = q + p.
062
And X = q – p, because X = ½(2X) = ½(X + X) = ½(X + X + Z – Z) = ½(Z + X – Z + X) = ½((Z + X) – (Z – X)) = ½(2q – 2p) = q – p.
063
And if u = Y, u3 = 2p(p2 + 3q2), because u3 = Y3 = Z3 – X3 = (q + p)3 – (q – p)3 = (q3 + 3q2p + 3qp2 + p3) – (q3 – 3q2p + 3qp2 – p3) = 6q2p + 2p3 = 2p(3q2 + p2) = 2p(p2 + 3q2).
064
Assume p and q are not relatively prime:
065
Then p = fP and q = fQ where f > 1.
066
And Z is divisible by f because Z = q + p = fQ + fP = f(Q + P).
067
And X is divisible by f because X = q – p = fQ – fP = f(Q – P).
068
So Z and X have a common factor f.
069
But this contradicts that Z and X are relatively prime.
070
So p and q are relatively prime.
071
Assume p and q are both even:
072
Then both p and q are divisible by 2.
073
But this contradicts that p and q are relatively prime.
074
So p and q cannot be both even.
075
Assume p and q are both odd:
076
Then Z = q + p is even, because an odd plus an odd makes an even.
077
But this contradicts that Z is an odd.
078
So p and q cannot be both odd.
079
Since p and q cannot be both even nor can p and q both be odd, p and q must have opposite parity.
080
So there exists integers u, p, and q such that u3 = 2p(p2 + 3q2) in which p is a positive integer and in which p and q are relatively prime and have opposite parity.
081
Case 3: Z is even and X and Y are odd:
082
And Y + X is odd number plus an odd number, which is also even, so let Y + X = 2p, where p is a positive integer.
083
Then Y – X is an odd number minus an odd number, which is even, so let Y – X = 2q, where q is an integer.
084
Then Y = p + q, because Y = ½(2Y) = ½(Y + Y) = ½(Y + Y + X – X) = ½(Y + X + Y – X) = ½((Y + X) + (Y – X)) = ½(2p + 2q) = p + q.
085
And X = p – q, because X = ½(2X) = ½(X + X) = ½(X + X + Y – Y) = ½(Y + X – Y + X) = ½((Y + X) – (Y – X)) = ½(2p – 2q) = p – q.
086
And if u = Z, u3 = 2p(p2 + 3q2), because u3 = Z3 = X3 + Y3 = (p – q)3 + (p + q)3 = (p3 – 3p2q + 3pq2 – q3) + (p3 + 3p2q + 3pq2 + q3) = 2p3 + 6pq2 = 2p(p2 + 3q2).
087
Assume p and q are not relatively prime:
088
Then p = fP and q = fQ where f > 1.
089
And X is divisible by f because X = p + q = fP + fQ = f(P + Q).
090
And Y is divisible by f because Y = p – q = fP – fQ = f(P – Q).
091
So X and Y have a common factor f.
092
But this contradicts that X and Y are relatively prime.
093
So p and q are relatively prime.
094
Assume p and q are both even:
095
Then both p and q are divisible by 2.
096
But this contradicts that p and q are relatively prime.
097
So p and q cannot be both even.
098
Assume p and q are both odd:
099
Then Y = q + p is even, because an odd plus an odd makes an even.
100
But this contradicts that Y is an odd.
101
So p and q cannot be both odd.
102
Since p and q cannot both be even, nor can p and q both be odd, p and q must have opposite parity.
103
So there exists integers u, p, and q such that u3 = 2p(p2 + 3q2) in which p is a positive integer and in which p and q are relatively prime and have opposite parity.
104
In all three cases, there exists integers u, p, and q such that u3 = 2p(p2 + 3q2) in which p is a positive integer and in which p and q are relatively prime and have opposite parity.
105
Since p and q have opposite parity, p2 + 3q2 is odd
106
Case 1: p is even and q is odd:
107
Then p2 is even because an even times an even is an even.
108
And 3q2 is odd because an odd times an odd times an odd is an odd.
109
So p2 + 3q2 is odd because an even plus an odd is an odd.
110
Case 2: p is odd and q is even:
111
Then p2 is odd because an odd times an odd is an odd.
112
And 3q2 is even because an odd times an even times an even is an even.
113
And p2 + 3q2 is odd because an odd plus and even is odd.
114
In either case, p2 + 3q2 is odd.
115
The greatest common factor of 2p and p2 + 3q2 is either 1 or 3.
116
Assume p and p2 + 3q2 have a common factor f > 3:
117
Then p = fP and p2 + 3q2 = fN
118
Then q is divisible by f as well because 3q2 = fN – p2 = fN – (fP)2 = fN – f2P2 = f(N – fP2)
119
So p and q have a common factor f > 3
120
But this contradicts that p and q are relatively prime.
121
So p and p2 + 3q2 do not have a common factor f > 3.
122
Since p2 + 3q2 is odd, it cannot have a factor of 2.
123
Since p and p2 + 3q2 do not have a common factor f > 3, and p2 + 3q2 does not have a factor of 2, then 2p and p2 + 3q2 do not have a common factor f > 3 nor a common factor of 2.
124
In other words, the greatest common factor of 2p and p2 + 3q2 is either 1 or 3.
125
Case 1: The greatest common factor of 2p and p2 + 3q2 is 1:
126
Since u3 = 2p(p2 + 3q2) and the greatest common factor of 2p and p2 + 3q2 is 1, then both 2p and p2 + 3q2 must be cubes.
127
Since p and q are relatively prime, then every odd factor of p2 + 3q2 must also have the same form, because of the theorem for a2 + 3b2 (see here)
128
Since p2 + 3q2 is a cube and an odd number, its cube root must also be odd, and as an odd factor of p2 + 3q2 it must also have the same form.  So there must exist positive integers a and b such that p2 + 3q2 = (a2 + 3b2)3.
129
So p = a3 – 9ab2 and q = 3a2b – 3b3, because p2 + 3q2 = (a2 + 3b2)3 = a6 + 9a4b2 + 9a2b4 + 27b6 = a6 + 27a4b2 – 18a4b2 + 81a2b4 – 54a2b4 + 27b6 = a6 – 18a4b2 + 81a2b4 + 27a4b2 – 54a2b4 + 27b6 = a6 – 18a4b2 + 81a2b4 + 3(9a4b2 – 18a2b4 + 9b6) = (a3 – 9ab2)2 + 3(3a2b – 3b)2.
130
So 2p = 2a(a – 3b)(a + 3b) because 2p = 2(a3 – 9ab2) = 2a(a – 3b)(a + 3b).
131
Now 2a, a – 3b and a + 3b are relatively prime.
132
Assume a and b are not relatively prime:
133
Then a = fA and b = fB.
134
So p is divisible by f because p = a3 – 9ab2 = (fA)3 – 9(fA)(fB)2 = f3A3 – 9f3AB2 = f3(A3 – 9AB2)
135
And q is divisible by f because q = 3a2b – 3b3 = 3(fA)2(fB) – 3(fB)3 = 3f3A2B – 3f3B3 = f3(3A2B – 3B3)
136
So p and q have a common factor f.
137
But this contradicts that p and q are relatively prime.
138
So a and b are relatively prime.
139
Assume a and b are both even:
140
Then a and b are both divisible by 2.
141
But this contradicts that a and b are relatively prime.
142
So a and b cannot both be even.
143
Assume a and b are both odd:
144
Then p is even because p = a3 – 9ab2 which is an odd minus an odd which is even.
145
And q is even because q = 3a2b – 3b3 which is an odd minus an odd which is even.
146
Then p and q are both divisible by 2
147
But this contradicts that p and q are relatively prime
148
So a and b cannot both be odd.
149
Since a and b cannot both be even, nor can a and b both be odd, a and b must have opposite parity.
150
Since a and b have opposite parity, a – 3b and a + 3b are both odd
151
Case 1: a is even, b is odd:
152
Then a – 3b is an even minus an odd which is an odd.
153
And a + 3b is an even plus an odd which is also an odd.
154
Case 2: a is odd, b is even:
155
Then a – 3b is an odd minus an even which is an odd.
156
And a + 3b is an odd plus an even which is also an odd.
157
Either way, a – 3b and a + 3b are both odd.
158
Assume a is divisible by 3:
159
Then a = 3A.
160
And p is divisible by 3 because p = a3 – 9ab2 = a(a2 – 9b2) = 3A(a2 – 9b2).
161
And q is divisible by 3 because q = 3a2b – 3b3 = 3(a2b – b3).
162
So both p and q have a common factor of 3.
163
But this contradicts that p and q are relatively prime.
164
So a is not divisible by 3.
165
Assume a and a – 3b have a common factor f > 3:
166
Then a = fA and a – 3b = fN
167
Then b is divisible by f as well because 3b = a – fN = fA – fN = f(A – N).
168
So a and b have a common factor f > 3
169
But this contradicts that a and b are relatively prime.
170
So a and a – 3b do not have a common factor f > 3.
171
Since a – 3b is odd, 2a and a – 3b does not have a common factor f > 3, either.
172
Since a is not divisible by 3, neither is 2a, and so 2a and a – 3b do not have a common factor of 3.
173
Since a – 3b is odd, 2a and a – 3b do not have a common factor of 2.
174
Since 2a and a – 3b do not have a common factor f > 3, or 3, or 2, this means that 2a and a – 3b must be relatively prime.
175
Assume 2a and a + 3b are not relatively prime:
176
Then 2a = fM and a + 3b = fN
177
Then a – 3b is also divisible by f, because a – 3b = 2a – a – 3b = 2a – (a + 3b) = fM – fN = f(M – N)
178
But this contradicts that 2a and a – 3b are relatively prime.
179
So 2a and a + 3b must also be relatively prime.
180
Assume a – 3b and a + 3b are not relatively prime:
181
Then a – 3b = fM and a + 3b = fN.
182
Then 2a is also divisible by f, because 2a = a + a = a + a + 3b – 3b = a – 3b + a + 3b = fM + fN = f(M + N)
183
But this contradicts that 2a and a – 3b are relatively prime.
184
So a – 3b and a + 3b must also be relatively prime.
185
Since 2a and a – 3b are relatively prime, and 2a and a + 3b are relatively prime, and a – 3b and a + 3b are relatively prime, then 2a, a – 3b, and a + 3b are relatively prime.
186
Since 2p is a cube and 2p = 2a(a – 3b)(a + 3b) and 2a, a – 3b, and a + 3b are relatively prime, then 2a, a – 3b and a + 3b are all cubes as well, so x’3 = a – 3b, y’3 = a + 3b and z’3 = 2a.
187
Then x’3 + y’3 = z’3, because x’3 + y’3 = (a – 3b) + (a + 3b) = 2a = z’3.
188
Since x’3y’3z’3 = 2p and 2p is a factor of either X3, Y3, or Z3 which is a factor of either x3, y3, or z3, x’, y’ and z’ are all smaller than z.
189
Since a and b are positive integers and y’ = a + 3b and z’ = 2a, y’ and z’ are positive integer greater than 1.
190
Since p, y’ and z’ are positive and x’3y’3z’3 = 2p, x’ is also a positive integer greater than 1.
191
So there exists integers x’, y’, and z’ such that x’3 + y’3 = z’3 and 1 ≤ x’ < z, 1 ≤ y’ < z, and 1 ≤ z’ < z.
192
Case 2: The greatest common factor of 2p and p2 + 3q2 is 3:
193
Then 2p is divisible by 3, and p is divisible by 3, so let p = 3r.
194
Since p and q are relatively prime and p = 3r, q and r are also relatively prime.
195
Since p and q have opposite parity and p = 3r, q and r also have opposite parity.
196
Also, u3 = 18r(q2 + 3r2) because u3 = 2p(p2 + 3q2) = 2(3r)((3r)2 + 3q2) = 6r(9r2 + 3q2) = 18r(3r2 + q2) = 18r(q2 + 3r2)
197
Since q and r have opposite parity, q2 + 3r2 is odd
198
Case 1: q is even and r is odd:
199
Then q2 is even because an even times an even is an even.
200
And 3r2 is odd because an odd times an odd times an odd is an odd.
201
So q2 + 3r2 is odd because an even plus an odd is an odd.
202
Case 2: q is odd and r is even:
203
Then q2 is odd because an odd times an odd is an odd.
204
And 3r2 is even because an odd times an even times an even is an even.
205
And q2 + 3r2 is odd because an odd plus and even is odd.
206
In either case, q2 + 3r2 is odd.
207
Also, 18r and q2 + 3r2 are relatively prime.
208
Since p = 3r and p and q are relatively prime, q is not divisible by 3.
209
Assume q2 + 3r2 is divisible by 3.
210
Then q2 + 3r2 = 3s
211
And q is divisible by 3 since q2 = 3s – 3r2 = 3(s – r2)
212
But this contradicts that q is not divisible by 3.
213
So q2 + 3r2 is not divisible by 3.
214
Assume r and q2 + 3r2 have a common factor f > 3:
215
Then r = fR and q2 + 3r2 = fN
216
Then q is divisible by f because q2 = fN – 3r2 = fN – 3(fR)2 = fN – 3f2R2 = f(N – 3fR2)
217
Then q and r have a common factor f.
218
But this contradicts that q and r are relatively prime.
219
So r and q2 + 3r2 do not have a common factor f > 3.
220
Since r and q2 + 3r2 do not have a common factor f > 3 and q2 + 3r2 is not divisible by 3, this means that 3r and q2 + 3r2 do not have a common factor f > 3.
221
Since q2 + 3r2 is not divisible by 3, 3r and q2 + 3r2 do not have a common factor of 3.
222
Since q2 + 3r2 is odd, 3r and q2 + 3r2 do not have a common factor of 2.
223
Since 3r and q2 + 3r2 do not have a common factor f > 3, or 3, or 2, this means that 3r and q2 + 3r2 must be relatively prime.
224
Since u3 = 18r(q2 + 3r2) and the greatest common factor of 18r and q2 + 3r2 is 1, then both 18r and q2 + 3r2 must be cubes.
225
Since q and r are relatively prime, then every odd factor of q2 + 3r2 must also have the same form, because of the theorem for a2 + 3b2 (see here)
226
Since q2 + 3r2 is a cube and an odd number, its cube root must also be odd, and as an odd factor of q2 + 3r2 it must also have the same form.  So there must exist positive integers a and b such that q2 + 3r2 = (a2 + 3b2)3.
227
So q = a3 – 9ab2 and r = 3a2b – 3b3, because q2 + 3r2 = (a2 + 3b2)3 = a6 + 9a4b2 + 9a2b4 + 27b6 = a6 + 27a4b2 – 18a4b2 + 81a2b4 – 54a2b4 + 27b6 = a6 – 18a4b2 + 81a2b4 + 27a4b2 – 54a2b4 + 27b6 = a6 – 18a4b2 + 81a2b4 + 3(9a4b2 – 18a2b4 + 9b6) = (a3 – 9ab2)2 + 3(3a2b – 3b)2.
228
So 18r = 33(2b)(a – b)(a + b) because 18r = 18(3a2b – 3b3) = 18(3b)(a2 – b2) = 54b(a – b)(a + b) = 33(2b)(a – b)(a + b).
229
Now 2b, a – b and a + b are relatively prime.
230
Assume a and b are not relatively prime:
231
Then a = fA and b = fB.
232
So q is divisible by f because q = a3 – 9ab2 = (fA)3 – 9(fA)(fB)2 = f3A3 – 9f3AB2 = f3(A3 – 9AB2)
233
And r is divisible by f because r = 3a2b – 3b3 = 3(fA)2(fB) – 3(fB)3 = 3f3A2B – 3f3B3 = f3(3A2B – 3B3)
234
So q and r have a common factor f.
235
But this contradicts that q and r are relatively prime.
236
So a and b are relatively prime.
237
Assume a and b are both even:
238
Then a and b are both divisible by 2.
239
But this contradicts that a and b are relatively prime.
240
So a and b cannot both be even.
241
Assume a and b are both odd:
242
Then q is even because p = a3 – 9ab2 which is an odd minus an odd which is even.
243
And r is even because q = 3a2b – 3b3 which is an odd minus an odd which is even.
244
Then q and r are both divisible by 2
245
But this contradicts that q and r are relatively prime
246
So a and b cannot both be odd.
247
Since a and b cannot both be even, nor can a and b both be odd, a and b must have opposite parity.
248
Since a and b have opposite parity, a – b and a + b are both odd
249
Case 1: a is even, b is odd:
250
Then a – b is an even minus an odd which is an odd.
251
And a + b is an even plus an odd which is also an odd.
252
Case 2: a is odd, b is even:
253
Then a – b is an odd minus an even which is an odd.
254
And a + b is an odd plus an even which is also an odd.
255
Either way, a – b and a + b are both odd.
256
Assume b and a – b are not relatively prime:
257
Then b = fB and a – b = fN
258
Then a is divisible by f as well because a = b + fN = fB + fN = f(B + N).
259
So a and b have a common factor f
260
But this contradicts that a and b are relatively prime.
261
So b and a – b are relatively prime.
262
Since a – b is odd and b and a – b are relatively prime, 2b and a – b are relatively prime, too.
263
Assume 2b and a + b are not relatively prime:
264
Then 2b = fM and a + b = fN
265
Then a – b is also divisible by f, because a – b = a + b – 2b = (a + b) – 2b = fN – fM = f(N – M)
266
But this contradicts that 2b and a – b are relatively prime.
267
So 2b and a + b must also be relatively prime.
268
Assume a – b and a + b are not relatively prime:
269
Then a – b = fM and a + b = fN.
270
Then 2b is also divisible by f, because 2b = b + b = b + b + a – a = a + b – a + b = (a + b) – (a – b) = fN – fM = f(N – M).
271
But this contradicts that 2b and a – b are relatively prime.
272
So a – b and a + b must also be relatively prime.
273
Since 2b and a – b are relatively prime, and 2b and a + b are relatively prime, and a – b and a + b are relatively prime, then 2b, a – b, and a + b are relatively prime.
274
Since 18r is a cube and 18r = 33(2b)(a – b)(a + b) and 2b, a – b, and a + b are relatively prime, then 2b, a – b and a + b are all cubes as well, so x’3 = a – b, y’3 = 2b, and z’3 = a + b.
275
Then x’3 + y’3 = z’3, because x’3 + y’3 = (a – b) + (2b) = a + b = z’3.
276
Since 33x’3y’3z’3 = 18r and 18r is a factor of either X3, Y3, or Z3 which is a factor of either x3, y3, or z3, x’, y’ and z’ are all smaller than z.
277
Since a and b are positive integers and y’ = 2b and z’ = a + b, y’ and z’ are positive integer greater than 1.
278
Since p, y’ and z’ are positive and 33x’3y’3z’3 = 18r = 6p, x’ is also a positive integer greater than 1.
279
So there exists integers x’, y’, and z’ such that x’3 + y’3 = z’3 and 1 ≤ x’ < z, 1 ≤ y’ < z, and 1 ≤ z’ < z.
280
In either case, there exists integers x’, y’, and z’ such that x’3 + y’3 = z’3 and 1 ≤ x’ < x, 1 ≤ y’ < y, and 1 ≤ z’ < z.
281
Therefore, if x3 + y3 = z3, there must exist other positive integers x’, y’, z’ such that 1 ≤ x’ < z, 1 ≤ y’ < z, and 1 < z’ < z in which x’3 + y’3 = z’3.
282
But we can use the same argument to prove the existence of more positive integers x”, y”, z” such that 1 ≤ x” < z’, 1 ≤ y” < z’, and 1 < z” < z’ in which x”3 + y”3 = z”3, and another x’”, y’”, z’”, and so on, so we have a contradiction by the method of infinite descent.
283
So there are no positive integer solutions to x3 + y3 = z3
284
Any negative solution to x3 + y3 = z3 can be rearranged to an all positive solution also in the same form.
285
Case 1: there is exactly one negative solution to x3 + y3 = z3
286
Case a: x is negative, y and z are positive:
287
Then let X = -x, Y = z, and Z = y, where X, Y, and Z are positive integers
288
So x3 + y3 = z3 becomes (-X)3 + Z3 = Y3 or X3 + Y3 = Z3
289
Case b: y is negative, x and z are positive:
290
Then let X = z, Y = -y, and Z = x, where X, Y, and Z are positive integers
291
So x3 + y3 = z3 becomes Z3 + (-Y)3 = X3 or X3 + Y3 = Z3
292
Case c: z is negative, x and y are positive:
293
This is impossible, since x3 + y3 = z3 and a positive plus a positive must be a positive, not a negative.
294
Case 2: there are exactly two negative solutions to x3 + y3 = z3
295
Case a: x and y are negative, z is positive:
296
This is impossible, since x3 + y3 = z3 and a negative plus a negative must be a negative, not a positive.
297
Case b: x and z are negative, y is positive:
298
Then let Z = -x, Y = y, and X = -z, where X, Y, and Z are positive integers
299
So x3 + y3 = z3 becomes (-Z)3 + Y3 = (-X)3 or X3 + Y3 = Z3
300
Case c: y and z are negative, x is positive:
301
Then let X = x, Y = -z, and Z = -y, where X, Y, and Z are positive integers
302
So x3 + y3 = z3 becomes X3 + (-Z)3 = (-Y)3 or X3 + Y3 = Z3
303
Case 3: there are exactly three negative solutions to x3 + y3 = z3
304
Then let X = -x, Y = -y, and Z = -z, where X, Y, and Z are positive integers
305
So x3 + y3 = z3 becomes (-X)3 + (-Y)3 = (-Z)3 or X3 + Y3 = Z3
306
In all cases, there exist positive integers X, Y, and Z such that X3 + Y3 = Z3.
307
Since any negative solution to x3 + y3 = z3 can be rearranged to an all positive solution also in the same form, and there are no positive integer solutions to x3 + y3 = z3, then there are no negative integer solutions for x3 + y3 = z3, either.
308
Therefore, there are no nonzero integer solutions to x3 + y3 = z3

Q.E.D.