# Pythagorean triple

Smallest triple: ${\ displaystyle (3,4,5)}$

In number theory , a Pythagorean triple or Pythagorean number triple is formed from three natural numbers that can occur as lengths of the sides of a right triangle . With the side lengths of such a triangle, a right angle can easily be constructed, for example with the smallest triple . Because of the Pythagorean theorem , these triples are exactly the positive integer solutions of the Diophantine equation${\ displaystyle (3,4,5)}$

${\ displaystyle x ^ {2} + y ^ {2} = z ^ {2}}$.

If , and have no factor in common except 1, i.e. are coprime pairs , one speaks of a primitive Pythagorean triple.${\ displaystyle x}$${\ displaystyle y}$${\ displaystyle z}$

## history

The clay tablet Plimpton 322

Pythagorean triples can already be found on Babylonian clay tablets , which are dated to the time of the Hammurabi dynasty (1829 to 1530 BC). The cuneiform tablet Plimpton 322 contains 15 different Pythagorean triples, u. a. , and , which suggests that a method for calculating such triples was known more than 3500 years ago. For Egypt, the explicit mention of Pythagorean triples is only possible from a demotic papyrus of the 3rd century BC. Known, but the use in particular of the triplet and for slope angles for some pyramids from a time around two thousand years before the aforementioned papyrus was discussed. ${\ displaystyle (56,90,106)}$${\ displaystyle (119,120,169)}$${\ displaystyle (12709,13500,18541)}$${\ displaystyle (3,4,5)}$${\ displaystyle (20,21,29)}$

The Indian Baudhayana Sulbasutra from the 6th century BC contains five Pythagorean triples.

Pythagorean triples were treated by Euclid among the Greeks , after Proclus 's commentary on Euclid's elements by Pythagoras and Plato , and later by Diophantus .

## Examples

• ${\ displaystyle (3,4,5)}$is the smallest and best known Pythagorean triple. It is primitive because the three natural numbers only have 1 in common as a divisor. When using a twelve-knot cord , the proportions 3: 4: 5 can be used to create a right-angled triangle for the length of the sides and thus represent a right angle .
• ${\ displaystyle (5,12,13)}$and are examples of other small primitive Pythagorean triples.${\ displaystyle (8,15,17)}$
• Examples of non-primitive Pythagorean triples are with as a common factor or with the common factor .${\ displaystyle (15,20,55)}$${\ displaystyle 5}$${\ displaystyle (15,36,39)}$${\ displaystyle 3}$

## Primitive Pythagorean triples

Primitive Pythagorean triples are those for which , and have no common factor other than 1 (they are pairwise coprime ). ${\ displaystyle x}$${\ displaystyle y}$${\ displaystyle z}$

The primitive Pythagorean triples with are: ${\ displaystyle (x, y, z)}$${\ displaystyle z \ leq 300}$

 (3, 4, 5) (5, 12, 13) (8, 15, 17) (7, 24, 25) (20, 21, 29) (12, 35, 37) (9, 40, 41) (28, 45, 53) (11, 60, 61) (16, 63, 65) (33, 56, 65) (48, 55, 73) (13, 84, 85) (36, 77, 85) (39, 80, 89) (65, 72, 97) (20, 99, 101) (60, 91, 109) (15, 112, 113) (44, 117, 125) (88, 105, 137) (17, 144, 145) (24, 143, 145) (51, 140, 149) (85, 132, 157) (119, 120, 169) (52, 165, 173) (19, 180, 181) (57, 176, 185) (104, 153, 185) (95, 168, 193) (28, 195, 197) (84, 187, 205) (133, 156, 205) (21, 220, 221) (140, 171, 221) (60, 221, 229) (105, 208, 233) (120, 209, 241) (32, 255, 257) (23, 264, 265) (96, 247, 265) (69, 260, 269) (115, 252, 277) (160, 231, 281) (161, 240, 289) (68, 285, 293)

## Properties of primitive Pythagorean triples

If , and have no common factor other than 1, one speaks of a primitive Pythagorean triple. For every primitive triple, the product of the pairwise prime numbers is divisible by 3, 4 and 5 as well as odd, and of the numbers and one is even and the other is odd, being composed only of prime factors ( A058529 ). The height given in a right-angled triangle assigned to the primitive Pythagorean triple is irreducible. ${\ displaystyle x}$${\ displaystyle y}$${\ displaystyle z}$${\ displaystyle z}$${\ displaystyle x}$${\ displaystyle y}$${\ displaystyle yx}$${\ displaystyle \ pm 1 \ mod 8}$${\ displaystyle (x, y, z)}$${\ displaystyle h = {\ frac {xy} {z}}}$

## Generation of the Pythagorean triples

Pythagorean triples in the Cartesian coordinate system with x and y from 1 to 2500. The clearly dark lines mark triples of the form (3n) ² + (4n) ² = (5n) ²; further regularities become visible in the enlargement .
The symmetry to the 45 ° axis is a consequence of the commutative law .
x and y from −1000 to +1000

The formulas

${\ displaystyle x = u ^ {2} -v ^ {2}}$
${\ displaystyle y = 2uv}$
${\ displaystyle z = u ^ {2} + v ^ {2}}$

return a Pythagorean triple for any . It is primitive if and only if and are relatively prime and not both are odd. ${\ displaystyle u, v \ in \ mathbb {N}, u> v}$${\ displaystyle u}$${\ displaystyle v}$

These formulas were given by Euclid (Elements, Book 10, Proposition 29, Lemma 1). They are sometimes called Indian formulas because they are also explicitly given by the Indian mathematician Brahmagupta (598–668). Possibly they were also known to the Babylonians when they created Pythagorean triples, because the formulas result directly from the Babylonian multiplication formula :

${\ displaystyle a \ cdot b = {\ left ({\ frac {a + b} {2}} \ right)} ^ {2} - {\ left ({\ frac {ab} {2}} \ right) } ^ {2}}$

if you bet and . ${\ displaystyle a = u ^ {2}}$${\ displaystyle b = v ^ {2}}$

Conversely, every primitive Pythagorean triple can be generated from coprime ones with the help of these formulas . The height above the hypotenuse of a primitive Pythagorean triangle is always an irreducible fraction due to the pairwise coprime and thus also for coprime different parities. The numerator is always divisible by 12 because a factor can always be divided by 3. ${\ displaystyle (x, y, z)}$${\ displaystyle u, v \ in \ mathbb {N}}$${\ displaystyle h = x \ cdot y / z = (u ^ {2} -v ^ {2}) \ cdot 2uv / (u ^ {2} + v ^ {2})}$${\ displaystyle x, y, z}$${\ displaystyle u, v \ in \ mathbb {N}, u> v}$${\ displaystyle (u + v) \ cdot (uv) \ cdot 2uv}$

Any Pythagorean triple can be calculated from a primitive Pythagorean triple as having a positive integer . The natural number is the greatest common divisor of and is therefore uniquely determined. ${\ displaystyle (X, Y, Z)}$${\ displaystyle (x, y, z)}$${\ displaystyle (X = nx, Y = ny, Z = nz)}$${\ displaystyle n}$${\ displaystyle n}$${\ displaystyle X, Y, Z}$

Examples:

• ${\ displaystyle u = 2, v = 1}$delivers the triple .${\ displaystyle (3,4,5)}$
• Multiplication with returns . According to the formulas above, because and both are odd, it is not primitive.${\ displaystyle 2}$${\ displaystyle (6,8,10)}$${\ displaystyle u = 3, v = 1.}$${\ displaystyle 3}$${\ displaystyle 1}$
• ${\ displaystyle u = 3, v = 2}$ gives the primitive triple ${\ displaystyle (5,12,13).}$
• Multiplication with returns ; this is a Pythagorean triple that cannot be generated with the "Indian formulas". Indeed, these generate all primitive triples, but only part of the non-primitive triples.${\ displaystyle 7}$${\ displaystyle (35,84,91)}$

The connection of the tree structure of all primitive Pythagorean triples known from B. Berggren (1934) and A. Hall (1970) with the modular group was investigated by RC Alperin (2005). All primitive Pythagorean triples can be generated via seven different linear transformations , each starting from , in exactly three (apart from the arrangement) different ternary root trees , as Firstov generally proved. Exactly one root tree has one linear transformation in common with another, one of which generates, for example, all primitive Pythagorean triples , even all with any odd prime number , and the other root tree discovered by Price uses the two (mixed) representations and the primitive triplet with odd . ${\ displaystyle (3,4,5)}$${\ displaystyle (x, y, z = y + 1)}$${\ displaystyle x}$${\ displaystyle (p'q ', 2pq, pq' + qp ')}$${\ displaystyle (p'q ', 2pq, pq'-qp')}$${\ displaystyle q, (q, q ') = 1, p = q' + q, p '= q + p}$

### Derivation of the formula for the formation of the Pythagorean triples

If a Pythagorean triple results in dividing the associated equation by${\ displaystyle (X, Y, Z)}$${\ displaystyle X ^ {2} + Y ^ {2} = Z ^ {2}}$${\ displaystyle Z ^ {2}}$

${\ displaystyle \ left ({\ frac {X} {Z}} \ right) ^ {2} + \ left ({\ frac {Y} {Z}} \ right) ^ {2} = 1.}$

The numbers and are rational and positive and satisfy the coordinate equation of the unit circle${\ displaystyle x = {\ tfrac {X} {Z}}}$${\ displaystyle y = {\ tfrac {Y} {Z}}}$

${\ displaystyle x ^ {2} + y ^ {2} = 1.}$

So a point with rational coordinates is on the unit circle . The straight line through the points and intersects the y-axis at a point , where the slope of this straight line is, for which applies: ${\ displaystyle (x, y)}$${\ displaystyle (-1,0)}$${\ displaystyle (x, y)}$${\ displaystyle (0, t)}$${\ displaystyle t}$

${\ displaystyle t = {\ frac {y} {x + 1}}}$

Hence is a rational number. ${\ displaystyle t}$

If one eliminates from this equation and that of the unit circle, one obtains with ${\ displaystyle y}$

{\ displaystyle {\ begin {aligned} x ^ {2} + t ^ {2} (x + 1) ^ {2} & = 1 \\ (x ^ {2} -1) + t ^ {2} ( x + 1) ^ {2} & = 0 \\ (x + 1) [(x-1) + t ^ {2} (x + 1)] & = 0 \ end {aligned}}}

a determining equation for . ${\ displaystyle x}$

Because true , so both sides by must divide: ${\ displaystyle x> 0}$${\ displaystyle x + 1 \ neq 0}$${\ displaystyle (x + 1)}$

${\ displaystyle (x-1) + t ^ {2} (x + 1) = 0}$
${\ displaystyle x = {\ frac {1-t ^ {2}} {1 + t ^ {2}}}}$
${\ displaystyle y = t \ cdot (x + 1) = t \ cdot \ left ({\ frac {1-t ^ {2}} {1 + t ^ {2}}} + 1 \ right) = {\ frac {2t} {1 + t ^ {2}}}}$

So with that we have

${\ displaystyle (x, y) = \ left ({\ frac {1-t ^ {2}} {1 + t ^ {2}}}, {\ frac {2t} {1 + t ^ {2}} } \ right)}$

or, because one can set with relatively prime natural numbers : ${\ displaystyle t = {\ tfrac {v} {u}}}$${\ displaystyle u, \ v}$

${\ displaystyle \ left ({\ frac {X} {Z}}, \ {\ frac {Y} {Z}} \ right) = \ left ({\ frac {1-v ^ {2} / u ^ { 2}} {1 + v ^ {2} / u ^ {2}}}, \ {\ frac {2v / u} {1 + v ^ {2} / u ^ {2}}} \ right) = \ left ({\ frac {u ^ {2} -v ^ {2}} {u ^ {2} + v ^ {2}}}, \ {\ frac {2uv} {u ^ {2} + v ^ { 2}}} \ right)}$

This gives the Pythagorean triple

${\ displaystyle (X, Y, Z) = (u ^ {2} -v ^ {2}, \ 2uv, \ u ^ {2} + v ^ {2}).}$

It can happen that , and have a common factor . For example , it would follow. ${\ displaystyle u ^ {2} -v ^ {2}}$${\ displaystyle 2uv}$${\ displaystyle u ^ {2} + v ^ {2}}$${\ displaystyle D> 1}$${\ displaystyle u = 3, \ v = 1}$${\ displaystyle x = 8, \ y = 6, \ z = 10}$

However, the only option for this is to be considered. For suppose an odd prime divided both and so would be ${\ displaystyle D = 2}$${\ displaystyle p}$${\ displaystyle u ^ {2} -v ^ {2}}$${\ displaystyle u ^ {2} + v ^ {2}}$

${\ displaystyle v ^ {2} \ equiv u ^ {2} {\ pmod {p}}}$ and ${\ displaystyle v ^ {2} \ equiv -u ^ {2} {\ pmod {p}},}$

from which, because 2 is prime and 2 is relatively prime , one can further conclude: ${\ displaystyle p}$${\ displaystyle p}$

{\ displaystyle {\ begin {aligned} u ^ {2} & \ equiv -u ^ {2} {\ pmod {p}} \\ 2u ^ {2} & \ equiv 0 {\ pmod {p}} \\ u ^ {2} & \ equiv 0 {\ pmod {p}} \\ u & \ equiv 0 {\ pmod {p}} \\\ end {aligned}}}

The odd prime ie shares and due also . However, this contradicts the coprime numbers of and , so that it cannot be odd. So what remains is what is obviously actually possible and always the case with. ${\ displaystyle p}$${\ displaystyle u}$${\ displaystyle v ^ {2} \ equiv u ^ {2} {\ pmod {p}}}$${\ displaystyle v}$${\ displaystyle u}$${\ displaystyle v}$${\ displaystyle p}$${\ displaystyle D = 2}$${\ displaystyle u \ equiv v \ equiv 1 {\ pmod {2}}}$

However, one can sort out those that are relatively prime and both odd without losing primitive Pythagorean triples. Because, if and the triple surrender, then surrender and the triple . Here, coprime and not both are odd. ${\ displaystyle u, \ v}$${\ displaystyle u}$${\ displaystyle v}$${\ displaystyle (2a, 2b, 2c)}$${\ displaystyle u '= (u + v) / 2}$${\ displaystyle v '= (uv) / 2}$${\ displaystyle (b, a, c)}$${\ displaystyle u ', v'}$

## More formulas for Pythagorean triples

According to Proclus, the formulas of Pythagoras and Plato come from antiquity. Pythagoras gives the side lengths for odd , Plato for even the side lengths . If one sets , one can also state the formula of Pythagoras as for . ${\ displaystyle x = a, y = {\ frac {a ^ {2} -1} {2}}, z = {\ frac {a ^ {2} +1} {2}}}$${\ displaystyle a}$${\ displaystyle a}$${\ displaystyle x = a, y = {\ left ({\ frac {a} {2}} \ right)} ^ {2} -1, z = {\ left ({\ frac {a} {2}} \ right)} ^ {2} +1}$${\ displaystyle a = 2n + 1}$${\ displaystyle (2n + 1,2n ^ {2} + 2n, 2n ^ {2} + 2n + 1)}$${\ displaystyle n = 1,2,3, \ dotsc}$

## The first primitive Pythagorean triples

According to the Euclidean rules one obtains as primitive Pythagorean triples for example (ordered according to ): ${\ displaystyle u + v}$

u v x y z
2 1 3 4th 5
4th 1 15th 8th 17th
3 2 5 12 13
6th 1 35 12 37
5 2 21st 20th 29
4th 3 7th 24 25th
8th 1 63 16 65
7th 2 45 28 53
5 4th 9 40 41
10 1 99 20th 101
9 2 77 36 85
8th 3 55 48 73
7th 4th 33 56 65
6th 5 11 60 61

Two sequences of Pythagorean triples are also noteworthy.

• ${\ displaystyle u = n + 1}$and results in a triple for every odd number , which contains (as the smallest number) and in which the other two numbers differ by exactly 1. In the right triangle is the half circumference . The height above the hypotenuse cannot be shortened, just like the hypotenuse sections and .${\ displaystyle v = n}$ ${\ displaystyle (n \ geq 1)}$
${\ displaystyle (3,4,5), (5,12,13), (7,24.25), (9.40.41), (11.60.61), (13.84.85) , \ dotsc, (2n + 1,2n ^ {2} + 2n, 2n ^ {2} + 2n + 1), \ dotsc}$
${\ displaystyle 2n + 1> 1}$${\ displaystyle 2n + 1}$
${\ displaystyle 2n ^ {2} + 3n + 1}$
${\ displaystyle (2n (n + 1) (2n + 1)) / z}$${\ displaystyle p = (2n + 1) ^ {2} / z}$${\ displaystyle q = zp}$
• ${\ displaystyle u = 2n}$ ${\ displaystyle (n \ geq 1)}$and for every number divisible by 4 results in a triple that contains (for as the smallest number) and in which the other two numbers differ by exactly 2. In the right triangle is the half circumference . The height above the hypotenuse cannot be shortened, just like the hypotenuse sections and .${\ displaystyle v = 1}$
${\ displaystyle (3,4,5), (15,8,17), (35,12,37), (63,16,65), (99,20,101), (143,24,145), \ dotsc, (4n ^ {2} -1,4n, 4n ^ {2} +1), \ dotsc}$
${\ displaystyle 4n> 0}$${\ displaystyle 4n}$${\ displaystyle n> 1}$
${\ displaystyle 4n ^ {2} + 2n}$
${\ displaystyle 4n (4n ^ {2} -1) / z}$${\ displaystyle p = 16n ^ {2} / z}$${\ displaystyle q = zp}$

Even if the double of an odd number is still missing , it is easy to always find a (of course not primitive) Pythagorean triple by simply doubling the solutions of the first sequence . Thus one can any natural number a pair of numbers found with which to Pythagorean triples can be supplemented - at odd with the difference 1, straight with differential 2: ${\ displaystyle 2 \ cdot (2n + 1)}$${\ displaystyle (4n + 2,4n ^ {2} + 4n, 4n ^ {2} + 4n + 2)}$${\ displaystyle x> 2}$${\ displaystyle (y, z)}$${\ displaystyle x}$${\ displaystyle x, y, z}$${\ displaystyle x}$${\ displaystyle x}$

x y z
3 4th 5
4th 3 5
5 12 13
6 * 8 * 10 *
7th 24 25th
8th 15th 17th
9 40 41
10 * 24 * 26 *
11 60 61
12 35 37
13 84 85
14 * 48 * 50 *
15th 112 113
16 63 65
17th 144 145
18 * 80 * 82 *
19th 180 181
20th 99 101

Non-primitive triples are marked with *. The cases for are redundant since they represent a doubling of . ${\ displaystyle x = 4n + 2}$${\ displaystyle x = 2n + 1}$

## Generalization to Pythagorean ( N + 1) tuples

Pythagorean triples can be understood as points with integer coordinates on a circle with an integer radius. This idea can be generalized to any number of dimensions in such a way that a Pythagorean tuple represents a point with integer coordinates on a -dimensional hypersphere with an integer radius. ${\ displaystyle (N + 1)}$${\ displaystyle N}$

All of these -Tuples are solutions of the Diophantine equation , where denotes the radius. For all values ​​of with , for all tuples of integers, there are infinitely many solutions to this equation given by the following identity: with and for all . This results in the sum of squares of whole numbers and thus as a natural number . The proof is done directly by substituting and simplifying: ${\ displaystyle (N + 1)}$ ${\ displaystyle \ textstyle \ sum _ {k = 1} ^ {N} x_ {k} ^ {2} = r ^ {2}}$${\ displaystyle r}$${\ displaystyle N}$${\ displaystyle N> 1}$${\ displaystyle N}$${\ displaystyle \ textstyle \ forall (z_ {1}, z_ {2}, \ dotsc, z_ {N}) \ in \ mathbb {Z} ^ {N} \ exists (x_ {1}, x_ {2}, \ dotsc, x_ {N}) \ in \ mathbb {Z} ^ {N}: \ sum _ {k = 1} ^ {N} x_ {k} ^ {2} = r ^ {2}, r \ in \ mathbb {N}}$${\ displaystyle \ textstyle x_ {N} = z_ {N} ^ {2} - \ sum _ {k = 1} ^ {N-1} z_ {k} ^ {2}}$${\ displaystyle x_ {k} = 2z_ {N} z_ {k}}$${\ displaystyle k ${\ displaystyle r}$${\ displaystyle \ textstyle r = \ sum _ {k = 1} ^ {N} z_ {k} ^ {2}}$

### Proof of identity

${\ displaystyle \ sum _ {k = 1} ^ {N} x_ {k} ^ {2} = \ sum _ {k = 1} ^ {N-1} (2z_ {N} z_ {k}) ^ { 2} + \ left (z_ {N} ^ {2} - \ sum _ {k = 1} ^ {N-1} z_ {k} ^ {2} \ right) ^ {2}}$
${\ displaystyle = \ sum _ {k = 1} ^ {N-1} (2z_ {N} z_ {k}) ^ {2} + \ sum _ {k = 1} ^ {N} z_ {k} ^ {4} + \ sum _ {k \ neq j} ^ {N-1} \ sum _ {j = 1} ^ {N-1} z_ {k} ^ {2} z_ {j} ^ {2} - 2 \ sum _ {j = 1} ^ {N-1} z_ {N} ^ {2} z_ {j} ^ {2}}$
${\ displaystyle = \ sum _ {k = 1} ^ {N} z_ {k} ^ {4} + \ sum _ {k \ neq j} ^ {N-1} \ sum _ {j = 1} ^ { N-1} z_ {k} ^ {2} z_ {j} ^ {2} +2 \ sum _ {j = 1} ^ {N-1} z_ {N} ^ {2} z_ {j} ^ { 2}}$
${\ displaystyle = \ left (z_ {N} ^ {2} + \ sum _ {k = 1} ^ {N-1} z_ {k} ^ {2} \ right) ^ {2}}$
${\ displaystyle = \ left (\ sum _ {k = 1} ^ {N} z_ {k} ^ {2} \ right) ^ {2} \ quad \ square}$

This obviously agrees with the right hand side of the equation, which shows the validity of the identity for all -tuples of integers. ${\ displaystyle (N + 1)}$

#### Alternative proof

A more convenient notation of the facts and a formulation as a sentence can be obtained by looking at the following figure:

Be as well as: wherein the th component of , the -Einheitsmatrix and the dyadic product of the -th canonical unit vector with the vector designate. Then: . This is clearly a mapping that maps each grid point of a Cartesian grid onto another such grid point - with the property of having an integer Euclidean distance from the origin. ${\ displaystyle z \ in \ mathbb {Z} ^ {N}}$${\ displaystyle Q \ in \ mathbb {Z} ^ {N \ times N}}$${\ displaystyle Q (z): = 2z_ {N} I_ {N} -e_ {N} \ cdot z ^ {T}}$${\ displaystyle z_ {N}}$${\ displaystyle N}$${\ displaystyle z}$${\ displaystyle I_ {N}}$${\ displaystyle N \ times N}$${\ displaystyle e_ {N} \ cdot z ^ {T}}$${\ displaystyle N}$${\ displaystyle z}$${\ displaystyle \ forall z \ in \ mathbb {Z} ^ {N}: Q (z) \ cdot z \ in \ {q \ in \ mathbb {Z ^ {N}}: \ | q \ | \ in \ mathbb {N} \}}$

Here too, the proof is provided by simple calculations:

${\ displaystyle Q (z) \ cdot z = \ left (2z_ {N} I_ {N} -e_ {N} \ cdot z ^ {T} \ right) \ cdot z}$
${\ displaystyle = \ left (\ left ({\ begin {smallmatrix} 2z_ {N} & 0 & 0 & \ ldots & 0 \\ 0 & 2z_ {N} & 0 & \ ldots & 0 \\\ vdots & \ vdots & \ vdots & \ ddots & \ vdots \\ 0 & 0 & 0 & \ ldots & 2z_ {N} \ end {smallmatrix}} \ right) - \ left ({\ begin {smallmatrix} 0 & 0 & 0 & \ ldots & 0 \\ 0 & 0 & 0 & \ ldots & 0 \\\ vdots & \ vdots & \ vdots & \ ddots & \ vdots \\ z_ {1} & z_ {2} & z_ {3} & \ ldots & z_ {N} \ end {smallmatrix}} \ right) \ right) \ cdot z}$
${\ displaystyle = \ left ({\ begin {smallmatrix} 2z_ {N} & 0 & 0 & \ ldots & 0 \\ 0 & 2z_ {N} & 0 & \ ldots & 0 \\\ vdots & \ vdots & \ vdots & \ ddots & \ vdots \\ - z_ {1} & - z_ {2} & - z_ {3} & \ ldots & z_ {N} \ end {smallmatrix}} \ right) \ cdot z}$
${\ displaystyle = \ left (2z_ {N} z_ {1}, 2z_ {N} z_ {2}, \ dotsc, 2z_ {N} z_ {N-1}, z_ {N} ^ {2} -z_ { 1} ^ {2} -z_ {2} ^ {2} - \ dotsb -z_ {N-1} ^ {2} \ right) \ quad \ square}$

This corresponds precisely to the identity previously proven.

### Number of solutions

The number of solutions to the Diophantine equation depends on as well as on. The number of solutions for and can be found in the following table. The number of solutions in dimensions denotes the distance and the total number of all solutions with distance , so the following applies:${\ displaystyle \ textstyle \ sum _ {k = 1} ^ {N} x_ {k} ^ {2} = r ^ {2}}$${\ displaystyle N}$${\ displaystyle r}$${\ displaystyle N = 3}$${\ displaystyle N = 4}$${\ displaystyle r \ leq 10}$${\ displaystyle R_ {N} (r)}$${\ displaystyle N}$${\ displaystyle r}$${\ displaystyle Z_ {N} (r)}$${\ displaystyle \ leq r}$${\ displaystyle \ textstyle Z_ {N} (r) = \ sum _ {k = 1} ^ {r} R_ {N} (k)}$

${\ displaystyle r}$ 1 02 003 004th 005 006th 0007th 0008th 0009 0010 Follow in the OEIS
${\ displaystyle R_ {3} (r)}$ 6th 06th 030th 006th 030th 030th 0054 0006th 0102 0030th A267651
${\ displaystyle R_ {4} (r)}$ 8th 24 104 024 248 312 0456 0024 0968 0744 A267326
${\ displaystyle Z_ {3} (r)}$ 6th 12 042 048 078 108 0162 0168 0270 0300 A267309
${\ displaystyle Z_ {4} (r)}$ 8th 32 136 160 408 720 1176 1200 2168 2912 A264390

The entries in the sequence are divisible by. Danny Rorabaugh has shown this using the example . The proof can be easily generalized to all . ${\ displaystyle R_ {N} (r)}$${\ displaystyle 2N}$${\ displaystyle R_ {3} (r)}$${\ displaystyle N}$

It is true that the Diophantine equation has only trivial solutions of the form . Interestingly, it must apply so that a nontrivial solution exists for everyone . This follows directly from the four-square theorem of Lagrange , whereafter any natural number (and thus each square number) is represented as the sum of a maximum of four squares, and that the only view of the fact as the sum of square numbers through is provided. ${\ displaystyle R_ {N} (r) = 2N}$${\ displaystyle \ textstyle \ sum _ {k = 1} ^ {N} x_ {k} ^ {2} = r ^ {2}}$${\ displaystyle \ textstyle \ sum _ {k = 1} ^ {N-1} 0 ^ {2} + r ^ {2} = r ^ {2}}$${\ displaystyle N \ geq 4}$${\ displaystyle r> 1}$${\ displaystyle 2 ^ {2}}$${\ displaystyle 2 ^ {2} = 1 ^ {2} + 1 ^ {2} + 1 ^ {2} + 1 ^ {2}}$

## Connection with the Heronian triangles

Every triangle belonging to a Pythagorean triple is a Heronian triangle , that is, both the side lengths and the area are rational numbers. Every Heronian triangle can be broken down into two right-angled triangles, which are given by Pythagorean triples of rational numbers.

## The Fermatsche equation

A generalization of the Pythagorean triples is obtained by replacing the exponent 2 with a natural number . So one examines the Diophantine equation${\ displaystyle n}$

${\ displaystyle x ^ {n} + y ^ {n} = z ^ {n} \ qquad (2

and searches for solutions through natural (or whole) numbers excluding the trivial solutions in which one of the three numbers is equal to zero. ${\ displaystyle x, y, z}$

Around 1637, Pierre de Fermat asserted that there are no such triples. Although he gave no proof, this conjecture is called Fermat's Great Theorem . No evidence could be found for centuries. However, the search for it led to many interesting findings, especially in number theory . It was not until 1995 that the mathematician Andrew Wiles was finally able to prove Fermat's theorem.

Fermat had proof of the case and was dealing with the closely related case of a Heronian triangle whose area is a square (see Infinite Descent ). This problem goes back to Diophantus. ${\ displaystyle n = 4}$

## algorithm

A possible algorithm in the Haskell programming language could look like this. For a natural number it creates all possible triples whose hypotenuse does not exceed: ${\ displaystyle n}$${\ displaystyle n}$

pythTripels n = [(k*x, k*y, k*z) | (x,y,z) <- primitives, k <- [1..ndivz]] where
primitives = [(p^2-q^2, 2*p*q, p^2+q^2) | p <- takeWhile (\p -> p^2+1 <= n) [1..], q <- takeWhile (\q -> p^2+q^2 <= n) [1..p], odd (p+q) && gcd p q == 1]


In Python , List Comprehension is an elegant means of determining Pythagorean triples (example for all triples with c <100):

[(a, b, c) for a in range(1, 100) for b in range(a, 100) for c in range(b, 100) if a ** 2 + b ** 2 == c ** 2]


## literature

• Peter Bundschuh : Introduction to Number Theory . 6th, revised and updated edition. Springer-Verlag, Berlin a. a. 2008, ISBN 978-3-540-76490-8 .
• Helmuth Gericke : Mathematics in Antiquity, Orient and Occident . Matrix-Verlag, Wiesbaden 2005, ISBN 3-937715-71-1 .
• Georges Ifrah : The Universal History of Computing. From Prehistory to the Invention of the Computer . Translated from the French by David Bellos , EF Harding, Sophie Wood, and Ian Monk. First published in France with the title Histoire universelle des chiffres by Editions Robert Laffont, Paris, in 1994. Harvill Press, London 1998, ISBN 1-86046-324-X .
• Andreas Loos, Hans-Joachim Rein: Triangles with integral side lengths and an interior angle of 60 °, 90 ° or 120 °. In: The mathematical and scientific teaching (MNU). 37th year, 1984, No. 5, pp. 275-279.
• Harald Scheid : Number Theory . 3. Edition. Spectrum Academic Publishing House, Heidelberg u. a. 2003, ISBN 3-8274-1365-6 .

## Individual evidence

1. ^ Georges Ifrah: The Universal History of Computing. From Prehistory to the Invention of the Computer . S. 151 .
2. ^ Corinna Rossi: Mathematics and Architecture in Ancient Egypt. Cambridge UP 2003, p. 217. She cites Richard Parker: Demotic Mathematical Papyri. Brown University Press 1972, pp. 3-4, 35-40.
3. Rossi, loc. cit., p. 219. The Chephren pyramid with an angle of slope of around 53 degrees would therefore be considered for the use of (3, 4, 5), the red pyramid with an angle of slope of around 43 degrees for (20, 21, 29).
4. ^ Helmuth Gericke : Mathematics in Antiquity, Orient and Occident . Matrix-Verlag, Wiesbaden 2005, ISBN 3-937715-71-1 , p. 68 .
5. David Joyce: Euclid's Elements.
6. ^ Dickson: History of the Theory of Numbers. Volume 2, Carnegie Institution 1920, p. 166.
7. Harald Scheid: Number theory . 3. Edition. Spectrum Academic Publishing House, Heidelberg u. a. 2003, ISBN 3-8274-1365-6 , pp. 225 .
8. ^ André Weil: Number theory. An approach through history from Hammurapi to Legendre. Birkhäuser 1984, p. 8. As an alternative, he gives the formula , whereby the Babylonians, according to their number system based on 60, would only have taken products of 2, 3, 5 and would result from systematic trial and error.${\ displaystyle a ^ {2} = (bc) (b + c)}$${\ displaystyle a}$${\ displaystyle b}$${\ displaystyle c}$
9. B. Berggren: Pytagoreiska trianglar. Tidskrift för Elementär Matematik, Fysik och Kemi (in Swedish) 17 (1934), pp. 129-139.
10. ^ A. Hall: Genealogy of Pythagorean triads. Math. Gazette 54 (1970), pp. 377-379.
11. ^ RC Alperin: The Modular Tree of Pythagoras. (PDF) In: math.sjsu.edu. 2005, accessed June 4, 2020 .
12. VE Firstov: A Special Matrix Transformation Semi Group of Primitive Pairs and the Genealogy of Pythagorean Triples. (PDF) In: mathnet.ru. 2008, accessed May 4, 2020 .
13. ^ H. Lee Price: The Pythagorean Tree: A New Species. (PDF; 298 kB) In: arxiv.org. September 2008, accessed February 29, 2020 .
14. ^ Frank Bernhart, H. Lee Price: Heron's Formula, Descartes Circles, and Pythagorean Triangles. (PDF; 285 kB) In: arxiv.org. January 1, 2007, accessed February 29, 2020 .
15. The latter formula is already mentioned by Pythagoras (about 570-510 BC); see. Harald Scheid: Number Theory . 3. Edition. Spectrum Academic Publishing House, Heidelberg u. a. 2003, ISBN 3-8274-1365-6 , pp. 225 .
16. sequence A267651 in OEIS