By the Fermat equation I mean, of course, zn = xn + yn where x, y and z are positive integers and n>=2 is also a positive integer. The solutions to the equation in the case n=2 are well known and can be generated by the application of Euclid’s formulae.

When n=2 the solutions to zn= xn+ yn are called Pythagorean Triples and, if these have no common factors, they are called Primitive Pythagorean Triples, e.g. (3,4,5).

If we are going to look for solutions to these equations (or show there are none) then we can make some simplifying assumptions without loss of generality, e.g. that x, y and z have no common factors and that 0<x<y<z.

If we pick out the first few triples where x is odd we get (3 , 4 , 5 ) (5, 12, 13 ) (7, 24, 25)

(9, 40, 41) (11, 60, 61) etc. and if the position in this sequence is denoted by n,

the general term is given by (2n+1, n(2n+1)+n, n(2n+1)+(n+1)) where n∈ω.

Similarly if we pick out (8,15,17) (16,63,65) (24,143,145) etc. and again denote then general position in this sequence by n we get (8n, (2n-1)8n+8n-1, (2n)8n+1) where n∈ω.

Likewise with ((16n-4), (4n-2)(16n-4)+(16n-5),(4n-1)(16n-4)+1) which generates the sequence that starts off (12,35,37), (28,195,197), (44,483,485) etc. and

((16n+4),4n(16n+4)+16n+3,(4n+1)(16n+4)+1) which generates

(20,99,101), (36, 323,325), (52,165,173) etc.

Note: ((16n+4),n(16n+4)+(4n-3),n(16n+4)+(4n+5)) where n∈ω also generates Pythagorean triples such as

(20,21,29), (36,77,85), (52,165,173) etc. and because

((16n+4),4n(16n+4)+16n+3,(4n+1)(16n+4)+1) has the same ‘x’ value for each n, we can state that …

(16n+4)2=((4n+1)(16n+4)+1)2 – (4n(16n+4)+(16n+3))2

= (n(16n+4)+(4n+5))2– (n(16n+4)+(4n-3))2 for all n∈ω.

Then, if for example if n=4 …

682= 11572-11552= 2932-2852 and so 11572+2852= 11552+2932.

These sequences don’t account for all primitive Pythagorean triples, and no doubt there are others, but clearly they all fit the pattern (x,cx+d,ax+b) .

The question remains as to what can be proved about a, b, c and d in the cases where n>=3 or (indeed n=2).

The inequality, z<x2, can be sharpened a little to z<x2 – (n-1)x.

Proof

Suppose that z>x2– (n-1)x. It follows that x2<z+(n-1)x and so xn<(z+(n-1)x)xn-2 .

Hence, zn-yn<(z+(n-1)x)xn-2 and so …

z-y<((n-2)xn-1+zxn-2+xn-1)/(zn-1+ …+zyn-2+yn-1)<1.

From z-y<1 it follows again that z≤y, which contradicts one of the initial assumptions that y<z. Hence the inequality z<x2– (n-1)x is proved.

Note: the case z=x2– (n-1)x cannot occur because x and z would then have a common factor, again contradicting one of the initial assumptions.

After giving this last result some thought, I wondered if in fact z<x2– (n-1)y?

This is also true, but only if n≥3, and can be proved similarly to the above.

What about z<x2– (n-1)z or z<x2/n?

This is also true, but again only if n≥3.

Proof

Suppose that z<x2/n is false, i.e. that z≥x2/n. Then x2≤nz. Hence, xn≤nzxn-2 and so zn-yn≤nzxn-2.

It follows then that z-y≤nzxn-2/(zn-1 + yzn-2 + … yn-1). We need to show now that the RHS of this inequality is <1, or that the denominator of the RHS is >nzxn-2.

To this end suppose then that, for n≥3, zn-1+ yzn-2+ … yn-1≤nzxn-2.

By applying the AGM inequality to nzxn-2≥zn-1+ yzn-2+ … yn-1 we get …

nzxn-2>n(zy)(n-1)/2. This reduces to zxn-2>(zy)(n-1)/2. Squaring both sides gives z2x2n-4>(zy)n-1 and so x2n-4> zn-3yn-1. This reduces to zn-3<xn-3(x/y)n-1<xn-3 which is clearly false for n≥3.

Hence, for n≥3, zn-1+ yzn-2+ … yn-1>nzxn-2 and so z-y<1 or z≤y which contradicts one of the initial assumptions. So z<x2/n, if n≥3, is proved.

Note: when n=2, z<x2/2 is true for some triples such as (8,15,17) but false for others such as (3,4,5).

It has already been shown that x≥n+1, y≥n+2 and z≥n+3. z<x2/n means then that x2≥n(n+3)+1 or that x≥n+2 if n≥3.

Euclid’s Formulae and Primitive Pythagorean Triples (PPT’s).

These formulae allow PPT’s to be generated using 2 (positive integer) parameters, usually denoted by m and n. The PPT’s (usually) take the form ( m2 – n2, 2mn, m2+n2) where m>n≥1, m and n are coprime and m-n is odd. Clearly, m2+n2 is the largest number in each triple. It is easier to spot patterns in generated triples if these are ordered as in (x, y, z) where x<y<z.

Hence there are 2 cases that can occur, i.e. (m2– n2, 2mn, m2+n2) where m2-n2 < 2mn and

(2mn, m2-n2,m2+n2) where 2mn < m2 -n2.

Notation: Let the set of all PPT’s (x,y,z) where x<y<z be denoted by PPT and let the set of PPT’s where x is odd be denoted by OEO while when x is even the set of PPT’s is denoted by EOO.

Clearly PPT = OEO ∪ EOO and OEO ∩ EOO =Ø.

If m2-n2< 2mn then it is easy to show that n < m < (1+√2)n. Hence if we wished to write a program to generate such triples we would first have to choose n from 1,2,3, … and then choose m from (n+1), …, int((1+√2)n). I have written such a program in Python, where z and y, following integer division by x, are printed in the form ax + b and cx + d respectively.

Using the first 4 triples it can be easily seen that these satisfy the general term (2n+1,n(2n+1)+n,n(2n+1)+(n+1)).

However, the triple (33,[1*33+23],[1*33+32]) is just the first of an infinite sequence of triples that satisfy (18n+15,n(18n+15)+(15n+8),n(18n+15)+(15n+17)) where n∈ω.

Such sequences are not at all obvious if PPT’s are generated using the usual form of Euclid’s formulae and if y and z are not written as cx+d and ax+b respectively.

There are other patterns that emerge that could also merit some analysis.

If m2-n2 >2mn then it is easy to show that m > (1+√2)n. Hence if we wished to write a program to generate such triples we would first have to choose n from 1,2,3, … and then choose m from int((1+√2)n)+1, int((1+√2)n)+2,…

Here is such a program followed by its output in the same format as the above …

It is easy to show that these satisfy (4n+4,n(4n+4)+(4n+3),(n+1)(4n+4)+1) where n∈ω.

Further on in the output we see …

(20,[1*20+1],[1*20+9])

(28,[1*28+17],[1*28+25])

(36,[2*36+5],[2*36+13])

(44,[2*44+29],[2*44+37])

(52,[3*52+9],[3*52+17])

(60,[3*60+41],[3*60+49])

(68,[4*68+13],[4*68+21])

(76,[4*76+53],[4*76+61])

(84,[5*84+17],[5*84+25])

(92,[5*92+65],[5*92+73])

(100,[6*100+21],[6*100+29])

(108,[6*108+77],[6*108+85])

From these we get the sequences (16n+4,n(16n+4)+(4n-3),n(16n+4)+4n+5), where n∈ω,
and (16n+12,n(16n+12)+12n+5),n(16n+12)+(12n+13)) where n∈ω and from …

(48,[1*48+7],[1*48+25])

(60,[1*60+31],[1*60+49])

(84,[2*84+19],[2*84+37])

(96,[2*96+55],[2*96+73])

(120,[3*120+31],[3*120+49])

(132,[3*132+79],[3*132+97])

(156,[4*156+43],[4*156+61])

(168,[4*168+103],[4*168+121])

(192,[5*192+55],[5*192+73])

(204,[5*204+127],[5*204+145])

we get (36n+12,n(36n+12)+(12n-5),n(36n+12)+(12n+13)) where n∈ω and

(36n+24,n(36n+24)+(24n+7),n(36n+24)+(24n+25)) where n∈ω.

On the face of it there seem to be many more examples of infinite sequences of PPT’s from the case

m2– n2>2mn than from m2– n2 <2mn. However, looking at the above examples, there does seem to be a crossover between the two cases, e.g. in the appearance of (7,24,25) in

(36n+24,n(36n+24)+(24n+7),n(36n+24)+(24n+25)) etc.

In fact it is straightforward to show that if (a,b,c) is a primitive Pythagorean triple from the set OEO and if d=2(c-a) it follows that …

(dn+b,n(dn+b)+(bn+a),n(dn+b)+(bn+c)), where n∈ω, will generate an infinite sequence of PPT’s in the set EOO.

Proof

It is easy to show that the 3 values in (dn+b,n(dn+b)+(bn+a),n(dn+b)+(bn+c)), where n∈ω, are in ascending order and that dn+b is even while n(dn+b)+(bn+a) and n(dn+b)+(bn+c) are odd where n∈ω. Also …

(n(dn+b)+(bn+c))2 – (n(dn+b)+(bn+a))2 = (c-a)(2n(dn+b)+2bn+c+a)

=dn(dn+b)+dbn+c2-a2 = dn(dn+b)+dbn+b2 = (dn+b)2. (Using c2=a2+b2)

It is also true that if (a,b,c) is a primitive Pythagorean triple from the set OEO, and if d=2(c+a), then, as in the above proof, (dn+b,n(dn+b)+(bn-a),n(dn+b)+(bn+c)), n∈ω will generate an infinite sequence of PPT’s in the set where EOO.

So, every (a,b,c) in the set OEO can be used to generate 2 infinite sequences of PPT’s where the generated values lie in the set where EOO.

It is also clear that for every (a,b,c) in the set EOO, 2 infinite sequences of PPT’s can be generated using exactly the same formulae, i.e.

These infinite sequences of PPT’s can be arranged in a binary vine-like structure rather than a ternary tree. The ternary tree structure of PPT’s was discovered by B. Berggren in 1934. However, that hierarchical structure contains this binary vine-like structure within it.

The (horizontal) main stem of this vine-like structure has its root in the degenerate triple (0,1,1). This gives rise to the generating formulae (2n+1, n(2n+1)+n, n(2n+1)+(n+1)) where n∈ω and therefore …

So, if (a, b, c) is a PPT where a<b<c, and d=2(c+b), (dn+a,n(dn+a)+(an-b),n(dn+a)+(an+c)) will generate an infinite sequence of PPT’s, if n∈ω and n>1.

As in the case where d=2(c-b), if (a,b,c)∈ EOO and d=2(c+b), (dn+a,n(dn+a)+(an-b),n(dn+a)+(an+c)) belongs to EOO if n∈ω and n>1, and if (a,b,c)∈ OEO, so also do (dn+a,n(dn+a)+(an-b),n(dn+a)+(an+c)) againif n∈ω and n>1.

It remains to be proved that every PPT (P,Q,R) (say) either belongs to the horizontal main stem or that there is a ‘smaller’ PPT (a,b,c) which generates an infinite sequence of PPT’s containing (P,Q,R).

Proof

Suppose that (P,Q,R) is any PPT where 0<P<Q<R, R² = P² + Q² and gcd(P,Q,R)=1.

Note: n either represents the position along the main stem if (P,Q,R) belongs to the main stem, i.e. if (P,Q,R) has been generated from the degenerate PPT (0,1,1), or n represents the depth of (P,Q,R) down one of the four possible sequences generated by a ‘smaller’ non-degenerate PPT (a,b,c).

Conversely, if d/2<b then R-Q=d/2<b. Hence, n(P+b) +c – Q<b and so 0<c-b<Q-n(P+b).

(2.2) Suppose that a = -Q+n(P+b). Then d/2=R-Q=c+a>c>b. So, d/2>b.

Conversely if d/2>b then d/2=R-Q=c+a>b and so (c-a)(c+a)>(c-a)b and using c² – a² = b²

we have that b²>(c-a)b which implies that b>c-a and so a>c-b.

Hence it follows that -Q+n(P+b)>0.

So, once d and b have been determined from P, Q and R the sign (+ or -) of d/2-b determines the correct expression to use for a.

We need to show now that, in both cases where a>0, that a<b.

Clearly a≠b (a>0) otherwise c would be irrational, so either a<b or b<a.

We need to prove that a<b either by a contradiction argument or perhaps find a direct proof that a<b.

Proof

[1] We start with the case where a>0 and d/2<b. This means that Q=n(P+b)+a and that d/2=c-a.

We will assume that b<a.

From the definition of n, i.e. that n=int(Q/P) it follows that Q<(n+1)P.

So, n(P+b)+a=Q<(n+1)P and so nb+a<P. Using b<a now we have nb+b<P=nd+b, or b<d=2(c-a).

b<2(c-a) implies that b(c+a)<2b² or that c+a<2b from which it follows that a<b. This contradicts the initial assumption that b<a. Hence it follows that a<b.

[2] We start again with the second case where a>0 but d/2>b. This means that Q=n(P+b)-a and that d/2=c+a.

Now n≥1. If n=1 then Q=P+b-a>P and so b>a.

If n>1 then (P-d,Q-(2n-1)d-2b,R-(2n-1)d-2b) = ((n-1)d+b,(n-1)((n-1)d+2b)-a,(n-1)((n-1)d+2b)+c) is also a PPT where P-d<Q-(2n-1)d-2b<R-(2n-1)d-2b). This follows from d/2>b.

(P-d,Q-(2n-1)d-2b,R-(2n-1)d-2b) has the same form as (P,Q,R) except that n has been replaced by (n-1). If n=2 then it follows that b>a as above.

If we repeat this process, eventually we must end up with either b>a or the PPT (d+b,d+2b-a,d+2b+c) where

d+b<d+2b-a<d+2b+c, i.e. b>a. Hence the result is proved.

Note: It is clear that if a>0 then c<R and so (a,b,c) is a ‘smaller’ PPT that (P,Q,R).

The result is also true if a and b are interchanged in the generating formulae.

Hence the overall result is proved, i.e. that every PPT (Primitive Pythagorean Triple) (P,Q,R) belongs to either the ‘main stem’ sequence (1+2n, 2n(1+n), 2n(n+1)+1) for some positive integer n, or, there is a smaller PPT (a,b,c) such that (P,Q,R) belongs to at least one of the four possible sequences defined by …

(dn+b, dn²+2bn+a,dn²+2bn+c), n∈ω where d=2(c-a),

(dn+b, dn²+2bn-a,dn²+2bn+c),n∈ω where d=2(c+a),

(dn+a,n(dn+a)+(an+b),n(dn+a)+(an+c)) where n∈ω and d=2(c-b) or

(dn+a,n(dn+a)+(an-b),n(dn+a)+(an+c)) where n∈ω, n>1, and d=2(c+b).

Note: Some PPT’s belong to 2 different sequences, e.g. (1365,5428,5597) can be generated from (13,84,85) using d=2(c+b) and n=4 in (dn+a,n(dn+a)+(an-b),n(dn+a)+(an+c)) while …

(1365,5428,5597) can also be generated from (280,351,449) using d=2(c-a), n=3 and

Note: A ‘Silver Ratio’ PPT (a,b,c) is one where b-a=1. From the PPT sequence (dn+b,n(dn+b)+(bn-a),n(dn+b)+(bn+c)), where d=2(c+a), if we set n=1 we can generate another ‘Silver Ratio’ PPT which can be simplified to (2a+b+2c,a+2b+2c, 2a+2b+3c). Clearly, (a+2b+2c) – (2a+b+2c) = b-a. Hence there are an infinite number of these ‘Silver Ratio’ PPT’s .

Further inequalities flowing from zn = xn + yn include …

x3>ny2, if n≥3 and the stronger x3>nyz, if n≥3.

Proof that x3>nyz, if n≥3.

Suppose not then, x3<nyz, if n≥3.

So, it follows that xn<nyzx(n-3) and so z-y<nyzx(n-3)/(zn-1+ yzn-2+ … +yn-1)<nyzx(n-3)/(n(yz)(n-1)/2)<(x2/(yz))(n-3)/2≤1.

Hence z-y<1 which is not possible, and so the result is proved.

Note: From x3>nyz and using z≥y+1 and y≥x+1 we can derive x3>ny2+nx+n, which is clearly an inequality based on the form of an elliptic curve.

What about x3>nz2, if n≥3???

If we try to prove x3>nz2 where n≥3 using proof by contradiction, then we would start by assuming that x3<nz2. It would follow then that xn<nz2xn-3.

By applying the AGM inequality as before we get z-y<nz2xn-3/(n(yz)(n-1)/2).

This can be simplified to z-y<(z/y)(x2/yz)(n-3)/2 ≤ z/y.

Hence z-y<z/y and so z(y-1)≤y2 – 1 or z≤y + 1 (since y>1).

This in turn means that z=y+1 and so the Fermat equation becomes

(y+1)n = yn + xn. Consequences ??? …

Further inequalities easily proved from the Fermat equation include …

n(yz)(n-1)/2 < xn, from which x3>nyz can be deduced, and 2n(xz)(n-1)/2 <yn.

From these it follows easily that 2n2z(n-1) < (xy)(n+1)/2 and hence 2n2z(n-1)<y(n+1) and so z>√2n. Using z>√2n in 2n2z(n-1)<y(n+1) also means that y>√2n.