Primitive Pythagorean Triples, or PPT’s, are non-trivial integer solutions to the Pythagorean equation z^{2} = x^{2} + y^{2} where we assume that 0<x<y<z, and that x, y and z are co-prime.

Euclid’s 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 ( m^{2}– n^{2}, 2mn, m^{2}+n^{2})

or ( 2mn, m^{2}-n^{2}, m^{2}+n^{2}), where m>n≥1, m and n are co-prime, and m-n is odd. Clearly, m^{2}+n^{2 }is the largest number in each triple.

**Note:** It is easier to spot patterns in generated triples if these are **ordered** as in (x, y, z) where x<y<z.

There are 2 cases that can occur, i.e. ( m^{2}– n^{2}, 2mn, m^{2}+n^{2}) where m^{2}-n^{2}< 2mn and

( 2mn, m^{2}-n^{2}, m^{2}+n^{2}) where 2mn < m^{2}-n^{2}. If m^{2}-n^{2}< 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).

Any proofs that I have seen that establish the above formulae for x, y and z make use of parity, factorisability and co-primeness, but interestingly **do not make use of geometry**.

**It cannot be assumed of course that x, y, and z form the sides of a triangle. That has to be proved.**

However the consequences of proving that x, y, and z form the sides of a triangle lead to a simple method of generating PPT’s which is also simply proved.

**New Method**

**Returning **to the equation z^{2}= x^{2}+ y^{2}, it is easy to show that z<x+y, since x^{2}+ y^{2 }< (x+y)^{2 }and so, since 0<x<y<z, x, y, and z do form the sides of a triangle. It follows, from z<x+y and x<y, that z<2y. Hence y<z<2y, and so there is an integer **a**, where 0<**a**<y, such that z=y+**a**. Also, since 0<x<y, there is an integer **b**, where 0<**b**<y, such that x=y-**b**.

So, z^{2}= x^{2}+ y^{2 }becomes (y+a)^{2} = (y-b)^{2}+ y^{2}, where 0<a<y and 0<b<y.

After multiplying out and re-arranging (y+a)^{2} = (y-b)^{2}+ y^{2 }we get, 2a(a+b) = (y – (a+b))^{2}.

Hence 2|(y-(a+b)) and so y-(a+b) = 2c, where **c** is an integer and it is easy to show that c>0.

**Note:** [2c = y – (a+b) = y – (z-y + y-x) = y + x – z > 0]

So, x = a+2c, y = a + b + 2c = (x+b) and z = 2a + b + 2c = (y+a), where a(a+b)= 2c^{2}.

**Note:** it is easy to show that a<√2 c.

To generate PPT’s, first choose any integral c, **c≥1**; then choose integral **a** in the range **1≤a<√2c **so that a|2c^{2}; then finally choose integral **b** , b≥1, using a(a+b)= 2c^{2},

or b=(2c²)/a – a, making sure that the resulting x, y and z have no common factors.

**For example:**

If c=1 then a=1 and b = 1. Hence we get the PPT (3,4,5).

If c=2 then a=1 and b=7, and this gives the PPT (5,12,13)

If c=3 then a=1 and b=17 **or** a=2 and b=7, giving PPT’s (7,24,25) and (8,15,17).

If c=4 then a=1 and b=31 giving PPT (9,40,41).

If c=5 then a=1 and b=49 **or** a=2 and b= 23 giving PPT’s ( 11, 60, 61) and ( 12, 35, 37).

If c=6 then a = 1 and b = 71 and we get the PPT (13,84,85).

Etc.

The following is a short **Python** program to generate PPT’s using this method.

import math #Generating primitive Pythagorean Triples # def hcf(x,y): #assume y!=x while y!=x: if y>x: y=y-x else: x=x-y #endif #endwhile return x #enddef # def generate_triples(): for c in range(1,60): for a in range(1,int(math.sqrt(2)*c)+1): if int(2*c*c/a)==2*c*c/a: b=int(2*c*c/a)-a x=a+2*c y=a+b+2*c z=2*a+b+2*c if hcf(x,y)==1: print ("c = ",c) print ("x = ",x) print ("y = ",y) print ("z = ",z) print () #endif #endif #endfor #endfor #enddef # generate_triples()

**all**of the information from the equation

^{2}= x

^{2}+ y

^{2}together with the inequalities, and not just some of it. Also, the need to look at parity is removed and co-primeness only comes into play when choosing the values of

**a**and

**b**. The method is clearly exhaustive since

**c**can range over all positive integers. It is rather mind-blowing to think that the simple triangle property of x, y and z has lain in plain view since 300 BC? and yet no-one has noticed, or used it, until now.

^{3}= x

^{3}+ y

^{3}we assume that a non-trivial solution exists and then try to arrive at a contradiction. So we assume that there are x, y, z (positive integers) satisfying the equation z

^{3}= x

^{3}+ y

^{3}where 0<x<y<z. It is easily proved that x, y and z form the sides of an

**acute angled**triangle, i.e. that z<x+y and z²<x²+y². It follows, from z<x+y and x<y, that z<2y. Hence y<z<2y, and so there is an integer

**a**, where 0<

**a**<y, such that z=y+

**a**. Also, since 0<x<y, there is an integer

**b**, where 0<

**b**<y, such that x=y-

**b**.

**(y+a)**

^{3}= (y-b)^{3}+ y^{3}.**It is easily shown that a≠b.**

**a=b**, and so (y+a)

^{3}= (y-a)

^{3}+ y

^{3}and therefore (y+a)

^{3}– (y-a)

^{3}= y

^{3}. Hence 2a((y+a)

^{2}+ (y+a)(y-a) + (y-a)

^{2}) = y

^{3}. It follows from this that 2|y, and so y=2y

_{1}. Substituting for y, and dividing the result by 2, we get …

**a((2y**

_{1}+a)^{2}+ (2y_{1}+a)(2y_{1}-a) + (2y_{1}-a)^{2}) = 4y_{1}^{3}_{.}

_{1}+a)

^{2}+ (2y

_{1}+a)(2y

_{1}-a) + (2y

_{1}-a)

^{2 }but, if that is true, then 2|a

^{2}and so either way we have a contradiction.

**a≠b**.

^{3}= (y-b)

^{3}+ y

^{3 }it follows that y+a ≡ y-b + y mod 2 or,

^{3 }= (y-b)

^{3}+ y

^{3 }it follows that y+a ≡ y-b + y mod 3,

**(2a+b+6d)**…………………..*

^{3}= (a+6d)^{3}+ (a+b+6d)^{3}**Note:**It is easy to show that

**6d≠b**, otherwise if 6d=b, * becomes 7(a+b)³ = (a+2b)³ implying that ³√7 is rational which is obviously not true.

**3a(a+b)(2a+b+12d) = (6d)³**………………..**

**Some estimates involving a, b and d.**

**a<3d**.

**3d<2a+b.**

Hence **3d<2a+b** and so **a<3d<2a+b.**

It can also be shown that **4d<2a+b.**

Suppose not, then 4d≥2a+b.

Using the inequality, 4d≥2a+b, in ** we get 3a(a+b)16d≥(6d)^{3} . This simplifies to

2a(a+b)≥9d². From this it follows that (2a+b)² > 18d² or that 16d² > 18d² which is clearly not true.

Hence, **4d<2a+b. ** From this it follows easily that a<(3√2)/2)d = 2.121320344d.

These estimates can be refined a little. For example, if m is the positive root of the equation 36 = m³ + 6m² then **a<md<a+b/2**.

Suppose that md≤a, then from ** we have 3a(a+b)(2a+b)+36a²d<(6d)³ and so

3a(a+b)(2a+b)<36d(6d² – a²). Now md≤a implies that d≤a/m and so,

3a(a+b)(2a+b)<36d(6(a/m)² – a²) = 36a²d(6/m² – 1) = 6a²dm ≤ 6a³. So, 3a(a+b)(2a+b) < 6a³ which is clearly not possible.

Hence** a<md**.

**md < a+b/2.**

**a<md**and the value of m can be easily shown to be 6/(³√2 + ³√4) or 2.107243152.

**3a(a+b)(2a+b+12d) = (6d)³**, if we divide both sides by 3 we get

**a(a+b)(2a+b+12d) = 72d³ .**Since a≠b, it follows that a+b≥3. If a+b = 3 then it is easily verified that we can’t have a=1 and b=2 or a=2 and b=1 and so a+b≥4. It is again easily verified that we can’t have a=1 and b=3 or a=3 and b=1 and so

**a+b≥5**. It follows from this that

**d≥2**and so

**d**must have a prime divisor.

**a+b can’t be a prime number ≥5**. Suppose a+b is a prime p ≥5. Then clearly p|d and so d=pq for some whole number q. So, **a(a+b)(2a+b+12d) = 72d³** becomes

ap(a+p+12pq) = 72p³q³ and reduces to a(a+p+12pq) = 72p²q³. It is clear then that p|a, but this is not possible since a<p. **Hence the result.**

A similar argument shows that **2a+b+12d** can’t be prime.

The equation **a(a+b)(2a+b+12d) = 72d³** can be re-arranged to give …

**a(a+b)(2a+b**) **= 12d(6d² – a(a+b)). **

Clearly 2** |a(a+b)(2a+b) **and so 2 | exactly one of a, (a+b) and (2a+b), otherwise 2 | all three of a, (a+b) and (2a+b) and since 2 | 6d then 2 | x, y and z contradicting gcd(x,y,z)=1. If 2 | a or (a+b) then it is clear that 8 | a or (a+b).

If 2| (2a+b) then **(6d² – a(a+b))** must be odd and so 4| (2a+b) if d is odd and

2^(n+2) | (2a+b) if 2^n | d.

Since a≥1, a+b≥5 and a+b>2d, ** 12d(6d² – a(a+b))=a(a+b)(2a+b) >12d** and so

**(6d² – a(a+b))**>1 or **(6d² – a(a+b))≥2**. Hence **(6d² – a(a+b))** has a prime factor.

If p is prime and p|d then p divides at least one of a, (a+b) and (2a+b). If p| a or (a+b) then p² | a(a+b)(2a+b). If p| any two of a, (a+b) and (2a+b) then it divides all three and since p|d that contradicts gcd(x,y,z)=1. Hence if p|a or (a+b) then p² | a or (a+b) and therefore p³ | a or (a+b). So it follows that d = ABC where a = fA³ , a+b =gB³ and C and a or (a+b) have no common factors. If f or g is 1 then a or (a+b) is a cube. So, suppose that f>1 and so has a prime divisor q (say). Then q is 2, 3 or q|d or q|(6d² – a(a+b)).

**a**has a prime divisor p(say) where p>3 then p|d and so p³ |

**a(a+b)(2a+b+12d).**

**a**and

**d**) which in turn contradicts gcd(x,y,z)=1. Hence p³|a.

**a, (a+b)**and

**(2a+b+12d)**is a cube, and at least one is not a cube otherwise 72d³ would be a cube.

**3a(a+b)(2a+b+12d) = (6d)³**can also be written as

**3a(a+b)(2a+b) = (6d)³**–

**6a(a+b)(6d)**and then as

**(2a+b)³ – a³ – (a+b)³ = (6d)³ – 6a(a+b)(6d).**

**TBC >>>**

**Note:**It is easy to show that

**6d≠b**, otherwise if 6d=b, * becomes 7(a+b)³ = (a+2b)³ implying that ³√7 is rational which is obviously not true.

**Hence, if it can be shown that ³√((λ+2)³ – (λ+1)³ ) is irrational for all λ≠0, λ∈Q, we have a contradiction.**

**Lemma 1**

^{p-1}+ xy

^{p-2}+ … + x

^{p-2}y + x

^{p-1}. Assume that p|y-x.

**Proof**

^{p-1}+ (x-y)y

^{p-2}+ y

^{p-1 }… + (x

^{p-2}– y

^{p-2})y + y

^{p-1}+ x

^{p-1}

^{p-1}+(x-y)y

^{p-2}+ (x

^{2}-y

^{2})y

^{p-3}+… + (x

^{p-2}– y

^{p-2})y + x

^{p-1}

^{p-1}≡ 1 mod p as is y

^{p-1}≡ 1 mod p, since neither x nor y is divisible by p.

**Lemma 2**

^{p-1}+ xy

^{p-2}+ … + x

^{p-2}y + x

^{p-1}. If q|∑ then it must follow that q|y as the following proof shows.

**Proof**

^{p-1}+ xy

^{p-2}+ … + x

^{p-2}y + x

^{p-1}+ x

^{p-2}y -x

^{p-1 }or,

^{p-1}+ xy

^{p-2}+ … + 2x

^{p-2}y. Similarly, q|y

^{p-1}+ xy

^{p-2}+ … + 3x

^{p-3}y

^{2 }. Continuing that theme we arrive at q|py

^{p-1}and since q can’t divide p it follows that q|y.

^{n}= x

^{n}+ y

^{n}, where n is an odd prime ≥5, we assume again that a non-trivial solution exists and then try to arrive at a contradiction. So we can assume that there are x, y, z (positive integers) satisfying the equation and where 0<x<y

^{n}+ y

^{n}. It follows easily using an argument applied in the case n=3 that a≠b.

^{n}= (y-b)

^{n}+ y

^{n }it follows that y+a ≡ y-b + y mod 2 or 2| y-a-b. Hence y=a+b+2c where c>0. Since n is odd and ≥ 5, n=2k+1 where k≥2.

^{n}– x = x(x

^{n-1}– 1) = x(x

^{2k}– 1) = x(x

^{2}– 1)(x

^{2k-2}+ … + ) and so the presence of the factor(s) x(x

^{2}– 1) means that 3|x

^{n}-x. So, using arithmetic modulo 3 on (y+a)

^{n}= (y-b)

^{n}+ y

^{n }it follows that y+a ≡ y-b + y mod 3 or 3| y-a-b in which case 3|2c and so there is an integer d>0 such that d=3c. It now follows that y = a + b + 6d.

^{n}= (a+6ne)

^{n}+ (a+b+6ne)

^{n}where n is prime ≥ 5 and a, b and e are integers ≥ 1.We now rearrange this equation as (2a+b+6ne)

^{n}– (a+6ne)

^{n }= (a+b+6ne)

^{n }and then factorise the left-hand side as …(a+b)((2a+b+6ne)

^{n-1}+ (a+6ne)(2a+b+6ne)

^{n-2}+ … + (a+6ne)

^{n-1}) = (a+b+6ne)

^{n}. Again if we expand the RHS as a binomial in a+b and 6ne, it must follow that a+b|(6ne)

^{n}. A similar argument shows that a|(6ne)

^{n}.Now a+b ≥ 3, since a≠b, and so a+b must have a prime factor. Let q be any prime factor of a+b other than 2, 3 or n.It is clear then that q|e. If q|(2a+b+6ne)

^{n-1}+ (a+6ne)(2a+b+6ne)

^{n-2}+ … + (a+6ne)

^{n-1}then by Lemma 2, q|2a+b+6ne and so q|a. It follows then that q|b and so q is a common factor of x, y and z, which contradicts gcd(x,y,z)=1.Hence if a+b has a prime factor a+b can only be divided by 2, 3 or n.

## Leave a Reply