Pythagorean Triples
A demonstration algorithm to find all integer solutions of
the equation
X
2
+ Y
2
= Z
2
Based on the probable proof that Fermat claimed he found of
his Last Theorem (FLT) in 1637, but did not write down
By
Olaf Vethe
Email: olaf@hubbit.no
Phone/mobile: +47 91151762
Oslo / Norway
©Copyright 2017, 2018
by Olaf Vethe
Abstract
When Pierre de Fermat found his probable solution to his last theorem (FLT) in 1637, the path went
through an algorithm to find all Pythagorean Triples.
The first part, Evolving exponent 2 numbers, shows how exponent 2 numbers evolve with increasing
base number and how to systemize it into a table.
The second part, The pyramids, shows how a simple “twisting” of the table from part one (evolving
exponent 2 numbers) reveals the clue of the demonstration/proof.
1. Evolving exponent 2 numbers
Base Exponented Incr prior exp Incr of incr
1 1 +1
2 4 +3 +2
3 9 +5 +2
4 16 +7 +2
5 25 +9 +2
.. .. .. ..
Exponent 2 aggregate pyramid
Base
Aggregate
1
1
1
2
1
2
4
3
1
2
2
9
4
1
2
2
2
16
5
1
2
2
2
2
25
2. The pyramid
By turning the pyramid created (above) 90 degrees clockwise and slightly adjust it so that it
becomes vertically symmetric, the exponent-2 matrix will be like below, and maintain its
rules as built.
The aggregate exponent 2 pyramid (above) shows
3
2
+ 4
2
= 5
2
The left pyramid is 3
2
, the right pyramid is 4
2
, and the whole pyramid is 5
2
. The overlap (intersect)
pyramid between 3
2
and 4
2
is also a square-number (2
2
) . As the pyramids are constructed, the
aggregate of the values in the rectangle at the bottom (2+2) has to be equal the overlap pyramid (2
2
),
which it is.
Let T be the aggregate value of all elements within the overlap/intersect pyramid.
Let R be the aggregate value of all elements within the “rectangle at the bottom”.
Because all elements in R are even (divisible by 2), R has to be an even square number (=T that is a
square number by definition/construction of the pyramid), all even square numbers from 4 an
upwards will generate Pythagorean Triples by use of the pyramid construction the following way:
Use an even square number as basis and divide it by 2 (common factor of all elements in R). From
this result create all rectangles with sizes that are factors of the result, including where one factor is
1. Let these factors be a and c. The Pythagorean triple (X, Y, Z) becomes :
(a + sqrt(R), c + sqrt(R), a + c + sqrt(R)).
1
1
1
1
2
2
2
2
2
2
2
2
2
Let b = sqrt(R)
The pyramid may then be described (below) as x=a+b, y=b+c and z=a+b+c
a b c
1 1 1 1 1
2 2 2 2
2 2 2
2 2
2
R then becomes 2ac = b
2
Example
1 1 1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2
2 2 2 2 2 2 2
2 2 2 2 2 2
2 2 2 2 2
2 2 2 2
2 2 2
2 2
2
Example (above) shows R=16=4
2
which generates two solutions marked separately with
whole lines (1*8)and stapled lines (2*4).
8*1 (whole lines) generate the Pythagorean Triple x=1+4, y=8+4, z=1+4+8 => (5, 12, 13)
5
2
+ 12
2
= 13
2
=> 25 + 144 = 169
4*2 (stapled lines) generate the Pythagorean Triple x=2+4, y=4+4, z=2+4+4 => (6, 8, 10)
6
2
+ 8
2
= 10
2
=> 36 + 64= 100
The (4*2) is a non-primitive solution
Example:
b = 6 = 2*3
b
2
= 36 = 2
2
* 3
2
= 4 * 9 = 2ac =>
ac = 18 = 2 * 9 => a = 9 / c = 2 or
ac = 18 = 3 * 6 => a = 3 / c= 6
There are two solutions in the example, one is a primitive Pythagorean triple, the other is a
non-primitive.
Solution 1: (9+6)
2
+ (2+6)
2
= 225 + 64 = 289 = 17
2
Solution 2: (3+6)
2
+ (6+6)
2
= 81 + 144 = 225 = 15
2