Right-angled triangles with whole number sides have fascinated both professional mathematicians and number-enthusiasts since well before 300 BC when Pythagoras wrote about his famous "theorem". The oldest mathematical document in the world, a little slab of clay that would fit in your hand, is a list of such triangles. So what is so fascinating about them? This page starts from scratch and has lots of facts and figures with several online calculators to help in your own investigations.

What's on this page

Right-angled Triangles and Pythagoras' Theorem

Pythagoras and Pythagoras' Theorem

Pythagoras was a mathematician born in Greece in about 570 BC. He was interested in mathematics, science and philosophy. He is known to most people because of the Pythagoras Theorem that is about a property of all triangles with a right-angle (an angle of 90°):
a-b-h triangle If a triangle has one angle which is a right-angle (i.e. 90°) then there is a special relationship between the lengths of its three sides:
If the longest side (called the hypotenuse) is h and the other two sides (next to the right angle) are called a and b, then:
a2 + b2 = h2     Pythagoras' Theorem
or,
the square of the longest side is the same as the sum of the squares of the other two sides.
a2 + b2 = h2 is only true for right-angled triangles.
For example, if the two shorter sides of a right-angled triangle are 2 cm and 3 cm, what is the length of the longest side?
If the longest side is h, then, by Pythagoras' Theorem, we have:
h2=22 + 32 = 13
h=sqrt13 = 3·60555

The 3-4-5 Triangle

In the example above, we chose two whole-number sides and found the longest side, which was not a whole number.

It is perhaps surprising that there are some right-angled triangles where all three sides are whole numbers called Pythagorean Triangles. The three whole number side-lengths are called a Pythagorean triple or triad.
3-4-5 triangle An example is a = 3, b = 4 and h = 5, called "the 3-4-5 triangle". We can check it as follows:
32+42 = 9 + 16 = 25 = 52 so a2 + b2 = h2.

This triple was known to the Babylonians (who lived in the area of present-day Iraq and Iran) even as long as 5000 years ago! Perhaps they used it to make a right-angled triangle so they could make true right-angles when constructing buildings - we do not know for certain.
It is very easy to use this to get a right-angle using equally-spaced knots in a piece of rope, with the help of two friends. If you hold the ends of the rope together together and one friend holds the 4-th knot and and the other the 7-th knot and you all then tug to stretch the rope into a triangle, you will have the 3-4-5 triangle that has a true right-angle in it.
The rope can be as long as you like so you could lay out an accurate right-angle of any size.

Test a Triangle - is it Pythagorean?

Here is a little calculator that, given any two sides of a right-angled triangle will compute the third. Or you can give it all three sides to check. It will check that it is right-angled and, if so, if it is Pythagorean (all the sides are integers).
Here a and b are the two legs - the sides surrounding the right-angle and h is the longest side, the hypotenuse:
C A L C U L A T O R
a: b: h:

More Pythagorean Triples

Is the 3-4-5 the only Pythagorean Triple?
No, because we can double the length of the sides of the 3-4-5 triangle to and still have a right-angled triangle e.g Its sides will be 6-8-10 and we can check that 102 = 62 + 82.

Continuing this process by tripling 3-4-5 and quadrupling and so on we have an infinite number of Pythagorean triples:

345
6810
121620
152025
182430
or we can take the serires of multiples 1, 11, 111, 1111, etc and get a pattern:
345
334455
333444555
333344445555
...
All of these will have the same shape (have the same angles) but differ in size.

Are there any differently-shaped right-angled triangles with whole number sides?
Yes; one is 5, 12, 13 and another is 7, 24, 25.
How do we find these? Is there a systematic method? In the next section we answer the question
Is there is a formula for generating Pythagorean triples?

The m-n Formula for Pythagorean Triples

m^2-n^2, 2mn, m^2+n^2 Yes - we can generate Pythagorean Triples by supplying two different positive integer values for m and n in this diagram. You can multiply out these terms and check that
( m2 – n2 )2 + (2 m n)2 = ( m2 + n2 )2

Once we have found one triple, we have seen that we can generate many others by just scaling up all the sides by the same factor. A Pythagorean triple which is not a multiple of a smaller one is called a primitive Pythagorean triple.


Are all the Pythagorean triples of this m-n form?

The bad news is that the answer is "No", but the good news is that all primitive Pythagorean triples are generated by some m and n values in the formula above!
The formula using m and n will not give all triples since it misses some of the non-primitive ones, such as 9-12-15. This is a Pythagorean triple since, as a triangle, is it just 3 times the 3-4-5 triangle (by which we mean that we just triple the lengths of each side of a 3-4-5 triangle, which we already know is right-angled).

But 9, 12, 15 is missed by our m,n formula because:
Our formula said m and n were positive whole numbers and the Pythagorean triple was

m2 - n2 , 2mn , m2 + n2
and, since we want (positive) whole number values in our triple, then m>n (otherwise the first number in the triple is negative).
The 2mn value is one of the sides and the only even side in 9-12-15 is 12, so 12 = 2mn.
Hence mn = 6 and m>n, so we can only have two cases:
  1. m = 6 with n = 1 OR
  2. m = 3 and so n = 2
The first case gives the triple 35, 12, 37 and the second case gives 5, 12, 13, neither of which is the 9, 12, 15 triple.

A m-n Pythagorean Triple generator

Here is a calculator to compute the sides of a triangle using the formula above - just type in the values for m and n. Remember that the formula will find all the Primitive Triples but it will NOT find all the multiple ones. The calculator will tell you if your values of m and n generate a Primitive triple or a multiple of a primitive triple.
Using just the primitive triples generated by the formula, the Calculator will find all triples with a longest side (hypotenuse) of a particular value or within a range of values.
C A L C U L A T O R
m^2-n^2, 2mn, m^2+n^2
with m=
n=
triangles with  m=
up to m=

Book: The m-n formula and a proof are given as Theorem 225 in The Theory of Numbers by G Hardy and E M Wright, (5th edition, 1980) OUP, 442 pages. This is a classic book that is well worth studying but it does tend to be at university undergraduate level some of the time.

Pythagorean Triples

Now we have a generator for all primitive triples, we can use it to compute Pythagorean Triples in lots of different ways. This calculator generates primitive triangles from m and n values (and the multiples of each if required) so will be slower for larger values of the hypotenuse.
C A L C U L A T O R

triangles with hypotenuse h=
up to

We can use the Calculator here to find all Pythagorean triangles with longest side up to 100, together with the length of the perimeter P (the sum of all three sides) and its area A which, since they are all right-angled triangles, is just half the product of the two sides (those that form the right-angle):

All Pythagorean Triples with sides up to 100
arranged in order of hypotenuse (longest side):
with Perimeter (a+b+h) and Area (ab)/2
TriadPrimitive? P A
3, 4, 5primitive126
6, 8, 102x 3, 4, 52424
5, 12, 13primitive3030
9, 12, 153x 3, 4, 53654
8, 15, 17primitive4060
12, 16, 204x 3, 4, 54896
15, 20, 255x 3, 4, 560150
7, 24, 25primitive5684
10, 24, 262x 5, 12, 1360120
20, 21, 29primitive70210
18, 24, 306x 3, 4, 572216
16, 30, 342x 8, 15, 1780240
21, 28, 357x 3, 4, 584294
12, 35, 37primitive84210
15, 36, 393x 5, 12, 1390270
24, 32, 408x 3, 4, 596384
9, 40, 41primitive90180
27, 36, 459x 3, 4, 5108486
30, 40, 5010x 3, 4, 5120600
14, 48, 502x 7, 24, 25112336
24, 45, 513x 8, 15, 17120540
20, 48, 524x 5, 12, 13120480
28, 45, 53primitive126630
33, 44, 5511x 3, 4, 5132726
40, 42, 582x 20, 21, 29140840
36, 48, 6012x 3, 4, 5144864
TriadPrimitive? P A
11, 60, 61primitive132330
39, 52, 6513x 3, 4, 51561014
25, 60, 655x 5, 12, 13150750
33, 56, 65primitive154924
16, 63, 65primitive144504
32, 60, 684x 8, 15, 17160960
42, 56, 7014x 3, 4, 51681176
48, 55, 73primitive1761320
24, 70, 742x 12, 35, 37168840
45, 60, 7515x 3, 4, 51801350
21, 72, 753x 7, 24, 25168756
30, 72, 786x 5, 12, 131801080
48, 64, 8016x 3, 4, 51921536
18, 80, 822x 9, 40, 41180720
51, 68, 8517x 3, 4, 52041734
40, 75, 855x 8, 15, 172001500
36, 77, 85primitive1981386
13, 84, 85primitive182546
60, 63, 873x 20, 21, 292101890
39, 80, 89primitive2081560
54, 72, 9018x 3, 4, 52161944
35, 84, 917x 5, 12, 132101470
57, 76, 9519x 3, 4, 52282166
65, 72, 97primitive2342340
60, 80, 10020x 3, 4, 52402400
28, 96, 1004x 7, 24, 252241344
WWW: See also Douglas Butler's web page with a list of 2098 triples with hypotenuse up to 2100.

Patterns in Pythagorean Triples

Let's call the two sides of the triangle that form the right-angle, its legs and use the letters a and b. The hypotenuse is the longest side opposite the right-angle and we will often use h for it.
The two legs and the hypotenuse are the three sides of the triangle, triple or triad a,b,h.

Different authors use different ways of writing triads such as a-b-h but we will use a,b,h on this page.

The series of lengths of the hypotenuse of primitive Pythagorean triangles begins 5, 13, 17, 25, 29, 37, 41 and is A020882 in Sloane's Online Encyclopedia of Integer Sequences. It will contain 65 twice - the smallest number that can be the hypotenuse of more than one primitive Pythagorean triangle. The series of numbers that are the hypotenuse of more than one primitive Pythagorean triangle is 65, 85, 145, 185, 205, 221, 265, 305,... A024409

There are lots of patterns in the list of Pythagorean Triples above. To start off your investigations here are a few.

Hypotenuse and Longest side are consecutive

The first and simplest Pythagorean triangle is the 3, 4, 5 triangle. Also near the top of the list is 5, 12, 13. In both of these the longest side and the hypotenuse are consecutive integers.
Are there any more like this?
The list tells us there are and we have the following:
3,4,5
5,12,13
7,24,25
9,40,41
11,60,61
Can you spot the pattern?
It is not immediately obvious, but you will have noticed that the smallest sides are the odd numbers 3, 5, 7, 9,... So the smallest sides are of the form 2i+1.
The other sides, as a series are 4, 12, 24, 40, 60... Can we find a formula here?
We notice they are all multiples of 4: 4x1, 4x3, 4x6, 4x10, 4x15,.. . The series of multiples: 1, 3, 6, 10, 15,... is the Triangle Numbers (look them up in Neil Sloane's Online Encyclopedia of Integer Sequences) with a formula i(i+1)/2.
So our second sides are 4 times each of these, or, simply, just 2i(i+1).
The third side is just one more than the second side: 2i(i+1)+1, so our formula is as follows:
Hypotenuse is one more than the longest side:
shortest side = 2i+1; longest side = 2i(i+1); hypotenuse = 1+2i(i+1)
Check now that the sum of the squares of the two sides is the same as the square of the hypotenuse (Pythagoras's Theorem).
ia:2i+1b:2i(i+1)h=b+1
132x1x2=45
252x2x3=1213
372x3x4=2425
492x4x5=4041
5112x5x6=6061
6132x6x7=8485
7152x7x8=112113
Alternatively, let's look at the m-n values for each of these triples. Since the hypotenuse is one more than a leg, the 3 sides have no common factor so are primitive and therefore all of them do have m-n values:
Triplemn
3, 4, 521
5, 12, 1332
7, 24, 2543
9, 40, 4154
11, 60, 6165
It is easy to see that m = n+1.
The m-n formula in this case gives
a = m2 – n2 = (n+1)2 – n2 = 2 n + 1
b = 2 m n = 2 (n+1) n = 2 n2 + 2 n
h = m2 + n2 = (n+1)2 + n2 = 2 n2 + 2 n + 1
So h is b+1 and the pattern is always true:
if m = n+1 in the m-n formula then it generates a (primitive) triple with hypotenuse = 1 + the longest leg.
Are these all there are? Perhaps there are other m-n values with a leg and hypotenuse consecutive numbers. In fact, they are all given by the formula above because:
The triangles must be primitive so we know they have an m-n form.
h = m2 + n2 could be either one more than either m2 – n2 or 2 m n: The only condition we can have is that m – n = 1 or m = n + 1 - there are no other triangles with hypotenuse one more than a leg except those generated by consecutive m n values in the m-n formula.

More information on these series:

An easy method of writing down a series of Triples

Look at the following series of Pythagorean triples. It is easy to spot the pattern and to remember it. If you then write it down to show your friends it will look as if you have impressive calculating skills!
21220221
2012020020201
200120020002002001
20001200020000200020001
It uses n+1 for m in the formula and then lets n be powers of 10. This simplifies the triples to be 2n+1, 2n(n+1), 2n2+2n+1.

Can you find another simple method like this that always produces Pythagorean Triangles (not necessarily with consecutive sides)?
Article: Solution to Problem: Find a Scheme for writing mechanically an unlimited number of Pythagorean Triangles M Willey, E C Kennedy, American Mathematical Monthly vol 41 (1934) page 330.
There is a Calculator below that you can use to generate many more simple patterns like this one.

The two legs are consecutive

Also in the 3, 4, 5 triple, the two legs of the triangle a and b are consecutive, b = a+1. Are there any more like this?
Yes! 20, 21, 29.
Although the list above does not contain any more, there are larger examples:
3, 4, 5     20, 21, 29     119, 120, 169     696, 697, 985
Because the two legs are consecutive numbers, they will have no common factor so all of these will be primitive. We can therefore find certain special values for m and n in the m-n formula above. Here is the same list with their m-n values:
mna=m2-n2 b=a+1=2mn h=m2+n2
21345
52212029
125119120169
2912697696985
This already suggests a way that we can use the generators m and n for one triple to find generators for the next.
See if you can find how and also find a formula for this pattern of triples.

Kayne Johnston aged 13 has also found the neat pattern to compute this table without using the m and n generators, each row being computed simply from the two rows before:
the next row in the table has a smallest side that is 6 times the previous smallest side minus the smallest side before that plus 2.
For instance, after the first two rows:

ab=a+1 h=sqrt(a2+b2)
345
212029
the left hand column (the smallest side) is six times 21 minus the one before (3) plus 2: 6x20-3+2 = 120-3+2 = 119.
The other side is just one more than the smallest, so here is it 120.
Can you find a similar method to compute the hypotenuse but without using Pythagoras Theorem on the two sides?

The series here are:

Beiler (see references at the foot of this page) gives a formula for these triples so that the rth triple in this list is given directly in terms of r.

More patterns

There are more patterns in the Pythagorean Triples Table above.
For instance there are primitive triangles whose longest side and hypotenuse differ by 2, such as 8, 15, 17 and 12, 35, 37 and many more. What is the mathematical pattern in these triples?

Another idea is to take the formula and find special cases, remembering that the formula does not generate all Pythagorean triples.
For instance, let n=1. We then have triples m2–1, 2m, m2+1, although we have to make the restriction that m>1 for the hypotenuse to be a positive number:

mm2–12mm2+1
2345
38610
417819
5241026
6351237
Notice that not all of these are primitive and also that there are other triples with a side two less than the hypotenuse that are not in this list.

Can any number be a side in some Pythagorean Triangle?

Note that here we use the terms leg, side, hypotenuse as follows: there are two legs and a hypotenuse making the 3 sides of each Pythagorean triangle.

The Number of Pythagorean Triangles having a side n

These sequences are the counts for n=1, 2, 3,... in each of the 6 categories:
so that 0, 0, 1, 1, 2,.. means 0 triangles for n=1, 0 for n=2, 1 for n=3, 1 for n=4, 2 for n=5 etc
PrimitiveAll
as a legA024361
0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 2, 1,..
A046079
0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 4, 3,...
as a hypotenuse A024362
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,...
A046080
0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0,...
total A024363
0, 0, 1, 1, 2, 0, 1, 1, 1, 0, 1, 2, 2, 0, 2, 1,...
A046081
0, 0, 1, 1, 2, 1, 1, 2, 2, 2, 1, 4, 2, 1, 5, 3,...
It looks like every fourth number after 2, namely 6, 10, 14, 28,... cannot be the side of a primitive triangle.
Also you might guess that there are no gaps in the list of numbers that can be a side of at least one triple.
These are indeed true but not proved here.
From the table above, we can make an ordered list of the numbers themselves that can appear as sides in each category.

The Possible Sides of Pythagorean Triangles

Here the actual sides are listed. If there is more than one possible Pythagorean triangle with a given side, the side is repeated in these sequences. The sequence of possible side lengths without repetitions is given in brackets.
PrimitiveAll
Legs 3, 4, 5, 7, 8, 9, 11, 12, 12, 13, 15, 15, 16,...
A024355 (A042965)
3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 11, 12, 12, 12, 12, 13, 14,...
A009041 (every integer>2)
Hypotenuses 5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 65,...
A020882 (A008846)
5, 10, 13, 15, 17, 20, 25, 25, 26,...
A009000 (A009003)
Sides 3, 4, 5, 5, 7, 8, 9, 11, 12, 12, 13, 13,...
A024357 (A042965)
3, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 12, 12, 13, 13,...
A009070 (every integer>2)

Number Series in Pythagorean Triangles

Other series of interest here are: Pythagorean Triangles with Equal Perimeters

The Incircle and Inradius

triangle with incircle We can draw a circle touching all 3 sides of any triangle, called the incircle with radius the inradius usually denoted by r and centre the incentre.
From the symmetry of the circle, a line from its centre to each vertex of the triangle will halve each of the angles in the triangle.

Lines from the incentre to the vertices (shown in blue here) divide the triangle into three smaller ones, each having the same height, r on a base of one side of the whole triangle.
The area of a triangle is one half of the base of the triangle times its height. So the three separate areas sum to the whole area:

area  = a r + b r + c r = r a + b + c
2222
The sum of the sides of a triangle is the length of its perimeter.
We now have a simple formula for the inradius, r of any triangle:
r  = 2 area
perimeter

incircle in right-angled triangle In a right-angled triangle, the area is just half the product of the two legs, a b / 2 or 2 area = a b so the formula for r is even simpler:
r = a b
a + b + h
in a right-angled triangle
Since all primitive right-angled Pythagorean triangles can be derived using the m-n formula above, then, in terms of m and n we have
r  = (m2–n2) 2mn = (m2–n2) 2mn = (m–n)(m+n)2mn = (m–n)n
m2–n2 + 2mn + m2+n22m2 + 2mn2m(m+n)
In primitive right-angled triangles, the inradius, r is therefore always an integer because m and n are.
Non-primitive triangles are just multiples of primitives, so their inradius is an integer too. We now have the general rule that:
the inradius is always a whole number in all Pythagorean triangles!

A more general Pythagorean Triple Calculator

This calculator will find Pythagorean triples for you, either primitive or all with any combination of sides with a fixed value or in a given range of values. You can find the actual triples or else just count the number found.
If you give a range of values, the total in that range can be counted (Total count of) or else a separate count with one count for each value in the range is given if you select Separately count. Sizes gives a list of those values in the range for which the requested type of triangle (all or primitive) exist. Values are repeated where there are different triples of the same size.
For example:

(*) There are very fast algorithms for counting the number of triangles (primitive or all) given the size of a leg, or a hypotenuse or a side, marked (*) in the list in the Calculator here. Otherwise, the triangles are generated and then counted, a process that takes some time for large sides.
Sizes reports the sizes (of the side/perimeter/area requested) in the given range, so that if a side/perimeter/area is found in more than one triple, it is reported once for each separate triple.
List lists all the triples found but if you want just one example use List one of.
The results are printed in the Results box, triples being given with their area, perimeter and inradius. This data can easily be selected and copied to be used in other applications or as text.
Here is the triple generator which can search for various conditions on its sides and has some very fast counting algorithms for some cases:

C A L C U L A T O R
triangles with
(*) = fast Count
=
up to

Finding a Pythagorean Triangle approximating a given Angle

Can we find a Pythagorean triangle with a given angle? Sometimes this may not be possible with small numbers but we will always be able to find some Pythagorean triangles with an angle almost equal to any angle you require.

Here is a Calculator to find a primitive triangle with better and better approximations to a given angle. It only generates primitive triangles since all its multiples have identical angles but bigger sides.

You can use Pi in the input box e.g. for the angle Pi/3 (radians).
If you want Pythagorean triangles with a specific ratio of sides, e.g. 1/3, then use the angle with that sine or cosine or tangent: e.g.

Calculations are slightly more accurate if radian measure is used.
C A L C U L A T O R
a primitive triangle with an angle of degrees
radians

Further Triple Patterns

The Angle-in-Triple Calculator above finds some interesting number patterns too.
For instance, there is no Pythagorean triangle with an angle of 45° (type in 45 into the "angle of..." box, make sure degrees is on and then click on the Find button) and if we ask the Calculator to find approximations it finds the sequence with legs differing by one that we found above.
If we try it on a series of angles such as 0.1, 0.01 and 0.001 radians, we discover two series of easily-remembered and visually striking patterns as in An easy method of writing down a series of triples above:
399 40 401  180 19 181
39999 400 4000119800 199 19801
3999999 4000 4000001 1998000 1999 1998001
399999999 40000 400000001 199980000 19999 199980001
Try it with 0.2, 0.02, 0.002 radians and you'll find at least two more patterns like this!
40 9 41 99 20 101
4900 99 49019999 200 10001
499000 999 499001999999 2000 1000001
49990000 9999 4999000199999999 20000 100000001
There are some more complicated patterns here too:
88501 17940 90301 -
899850001 17999400 900030001446930400 8939801 447019801
8999985000001 17999994000 90000030000014496993004000 8993998001 4497001998001
With 0.3, 0, 03 and 0,.003 there are patterns in the first four approximations:
12 5 1324 7 25
2112 65 21132244 67 2245
221112 665 221113222444 667 222445
22211112 6665 2221111322224444 6667 22224445

532 165 557391120409
55432 1665 5545739991 1200 40009
5554432 16665 55544573999991 12000 4000009
555544432 166665 555544457399999991 120000 400000009

The first triple in the final series is the one suggested by the rest of the pattern. It is indeed a Pythagorean triple -- check it with the Test a Triangle - is it Pythagorean? calculator above.

The series of angles 0.4, 0.04, 0.004 and 0.0004 radians generates:

12 5 1324 10 26
1200 49 12012499 100 2501
124500 499 124501249999 1000 250001
12495000 4999 1249500124999999 10000 25000001
The 0.5 radians sequence gives:
-15 8 17
760 39 7611599 80 1601
79600 399 79601159999 800 160001
7996000 3999 799600115999999 8000 16000001
and with 0.6 radiansand its tenths:
4 3 59160109
544 33 5459991 600 10009
55444 333 55445999991 6000 1000009
5554444 3333 555444599999991 60000 100000009

380 261 461
5436800 326601 5446601
55443668000 332666001 55444666001
555444366680000 333266660001 555444466660001

0.7 radians seems to give only one simple pattern:
351280449
39951 2800 40049
3999951 28000 4000049
399999951 280000 400000049
but 0.8 gives two:
-62450626
31000 249 3100162499 500 62501
3122500 2499 31225016249999 5000 6250001
312475000 24999 312475001624999999 50000 625000001
and 0.9 gives several:
4 3 5435345
220 21 221264 23 265483 44 485
24420 221 2442124864 223 2486549283 444 49285
2466420 2221 24664212470864 2223 24708654937283 4444 4937285
246886420 22221 246886421 246930864 22223 246930865493817283 44444 493817285

202129485573319 360 481
2240 201 22496148 555 617339919 3600 40081
222440 2001 222449617148 5555 6171733999919 36000 4000081
22224440 20001 2222444961727148 55555 61727173399999919 360000 400000081
2222244440 200001 22222444496172827148 555555 617282717339999999919 360000040000000081
0.010 will again give the first example above for 0.1.
However, do use the Calculator above and repeat the experiment. This time you will probably notice at least two more pattern series to add to your collection! How about 0.11, 0.011, 0.0011, ...
and then 0.12, 0.012, 0.0012, ...
and so on?
Also try 2/3, 2/30, 2/300, etc (the Calculator handles expressions as input) or you can input it as 0.6666, 0.06666, 0.006666, etc which has a one very simple pattern in particular.
You can also do this with any other (small) sequence of numbers making a decimal. Remember though that the biggest angle is 90° which is 1.57079632679489 radians.

The reason the patterns are so "obvious" above is that our numbers are written in base 10 and we are taking angles one-tenth as large each time.
An interesting mathematical Project is to find formulae for each of these series. It will then be easy to verify that all the triples in the series are Pythagorean by summing squares of the two legs and checking it equals the square on the hypotenuse.
You might even be able to find a formula that encompasses several of the series above.

What else can you find?
Email me at the address at the foot of this page and I'll add any interesting triples' series that you find, with your name.

Article: The Shapes and Sizes of Pythagorean Triangles P Shiu, Mathematical Gazette vol 67 (1983) pages 33-38. This describes the algorithm behind the angle-finder calculator above. To find a Pythagorean triangle with angles close to θ let u = tan(θ)+ sec(θ) and find its continued fraction. If the successive convergents to it are mk/nk then a suitable Pythagorean triangle is x = 2 mk nk, y = mk2 – nk2, z = mk2 + nk2.

More Curious Number Facts about Pythagorean Triangles

In every Pythagorean triangle the following 6 facts are always true:
  1. one side is a multiple of 3
  2. one side is a multiple of 4
  3. one side is a multiple of 5
  4. the product of the two legs is always a multiple of 12
  5. the area is always a multiple of 6
  6. the product of all three sides is always a multiple of 60
We can always find a Pythagorean triangle with a side of any given length (bigger than 2).

Pythagorean Triangles and Egyptian Fractions

Egyptian Fractions (also called Babylonian fractions) is the method of writing fractional values as used by the ancient Egyptians who built the Pyramids and before them the ancient Babylonians from whom we get our time measurements of seconds, minutes and hours and also our 360° in a full turn. They did not use the ratio of two whole numbers as we do, e.g. 4/5 (the ratio of 4 to 5 is "four-fifths" and is also 4 divided by 5. Instead they used a sum if unit fractions, so that 3/4 would be 1/2 + 1/4, a sum of two unit different fractions, that is fractions that we would write as 1/n but without repeating any fraction in a sum! Every fraction a/b can be written as a sum of distinct unit fractions, often in several ways and these are called Egyptian Fractions or Babylonian Fractions.
So the simplest kinds of fractions are those that can be written as a sum of two unit fractions.

The number of ways we can write 2/n as a sum of two different unit fractions gives the series 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1,... for n=3 onwards since 2/3=1/2+1/6 is the only way for 2/3, 2/8=1/4=1/12+1/6 = 1/20+1/5, two ways, so the first entry (for n=3) is 1 and the entry for n=8 is 2.
Surprisingly this series is just the number of Pythagorean triangles having n as a leg, series A046079 in the table above!

I have another page at this site to help you explore more about Egyptian Fractions

Pythagorean Triples and Fibonacci Numbers

The Fibonacci Numbers are a simple series of numbers that appear in lots of places in nature: 1, 2, 3, 5, 8, ... where each number is the sum of the previous two in the series.
Often mathematicians start tis series with 0 and 1 and we get the series: 0, 1, 1, 2, 3, 5, 8, 13, 21, ... .
To make a Pythagorean Triangle, take any 4 consecutive numbers in this series, such as 1, 1, 2, 3: So we have found the 3, 4, 5 triangle.

In fact you can start with any two starting numbers and use the Fibonacci-Rule (add the latest two to get the next) to generate two more and those 4 numbers will always generate a Pythagorean Triangle. Try it!

Is there a Pythagorean Triangle of Fibonacci Numbers?

It is easy to see that no triangle can exist with all 3 sides being different Fibonacci numbers:
If the sides are a<b<c then c is at least a + b by the Fibonacci rule. However, in any triangle the two shorter sides must add to more than the longest side or else the sides will not meet (think of the longest side as the base and the two shorter sides hinged at the ends of the base).
We know of two Pythagorean triangles with 2 Fibonacci numbers as sides:
3 4 5
5 12 13
It is thought that there are no more but this remains an open question.

Article: Pythagorean Triples Containing Fibonacci Numbers: Solutions for Fn2 ± Fk2 = K2 by M Bicknell-Johnson, Fibonacci Quarterly 17 (1979) pages 1-12, (Addenda: page 293).

Pythagorean Triples and Pi

While there does not appear to be any simple formula known for the number of Pythagorean triangles up to a given size (the methods used in the Calculators on this page depend on the factors of a number), there are a couple of simple approximations discovered by D H Lehmer in 1900 and they both involve pi (pi).
The number of primitive Pythagorean triangles with hypotenuse less that N is approximately N/2pi
For example, in the Table of Triples with sides up to 100 above, there were 16 primitive triples with a hypotenuse less than 100. Lehmer's approximation gives 100 / (2x3·14159) = 15·91.
The number of primitive triangles with a perimeter less than N is approximately N ln(2)/pi2
ln(2) is the natural log of 2 = that power of e which gives 2.
Since e0·693147...=2 then ln(2)= 0·693147... .
For example, the same Table above shows all 14 primitive triangles with perimeter less than 200; whereas Lehmer's formula says this is approximately (200 x 0·693147...) / pi2 = 14.04.

It seems remarkable that pi should appear in this context, but it does have an amazing tendency to appear in many such formulae for approximations.

Article: D H Lehmer, American Journal of Mathematics 1900, vol 22, page 38.

Pythagorean Triples or Babylonian?

A tiny block of clay, about the size of a postcard (5 inches x 3.5 inches or 12cm x 9cm) with 15 rows of 4 columns of "numbers" is dated to about 1800 BC and so is probably the world's oldest surviving mathematical artifact. Plimpton 322 is one of 600 such tablets donated to Columbia University's Rare Book and Manuscript Library by George Plimpton and was item 322 in his catalogue, hence its name. (Have a look at their other treasures too.)

Bill Casselman's page on The Babylonian tablet Plimpton 322 from University of British Columbia has the best image of the tablet and an excellent explanation of how to read Babylonian numbers and what the tablet contains.

And what does it contain? A list of Pythagorean Triangles arranged in order of triangles which are approximately 1 degree apart! They are written in their base 60 scale, and involve base 60 "fractions" and they were probably used in surveying.

Article: Words and Pictures: New Light on Plimpton 322 by Eleanor Robson in American Mathematical Monthly vol 109 (2002), pages 105-120 explores three theories as to the meaning of the numbers on Plimpton 322, one of which is that it is a trigonometric table.
Book: The Exact Sciences in Antiquity by Otto Neugebauer, Dover, (1969) 240 pages argues that the Plimpton 322 tablet contains Pythagorean triples for triangles for each degree from 30 to 45 and so detects several simple errors in the tablet's table.

/ Puzzles and Problems /

  1. Find the only two Pythagorean triangles with an area equal to their perimeter.
  2. Find three consecutive numbers which can be the hypotenuses of Pythagorean triangles.
    Can you find four consecutive numbers which are hypotenuses?
    What about five? and how about a set of nine?
  3. Find a few Pythagorean triangles whose smallest side is a square number
    e.g. 9=32, 12, 15, and 25=52, 312, 313.
    Of the primitive ones in your list, what is special about their m and n values?
  4. What about Pythagorean triples having a smallest side which is a cube number?
    e.g. 27=33, 36, 45.
    What is special about their m and n values?
  5. How many Pythagorean triangles have a side of length 48?
    Find a number that can be the side of even more Pythagorean triangles. (Hint: there is 3 others less than 100)
  6. What is the highest number of triples you can find with the same side in each?
  7. What is the smallest number that is the hypotenuse of more than one triple?
    What is the greatest number of triples you can find with the same hypotenuse?
    (*) Can you find one that is not a multiple of 5?
  8. 4/3/05 is a date and also a Pythagorean triple. There is another one this year ('05) - when is it?
    Assuming that the years are in this century, how many other days will have a Pythagorean Triple date if the year is the hypotenuse?
    If the date is any set of 3 numbers that are Pythagorean triples, how many dates are there in one century?
  9. How about a special Pythagorean Triple Time in hours:minutes:seconds? How many are there in a whole day if we use a 24-hour clock with hours from 0 to 23?
  10. In the Easy method of writing down a series of Triples section, we found a formula for the pattern given there and used it with n = 10, 100, 1000, ....
    What pattern do you get with n = 20, 200, 2000, ...?
    ... and with n = 30, 300, 3000, ...?
  11. Find your own Pythagorean Triple Pattern not already mentioned in Further Triple Patterns above.
    Here is another way to do this.
    Think of a series of numbers that are like those in the lists above, e.g. from the 399, 40, 401 pattern we might think of hypotenuses that are in the series 901, 90001, 900001, ... . Plug these numbers into the Triples generator and see if any patterns emerge. The hypotenuse searches on 901 and 90001 give:
    • Triples with hypotenuse=901:
      1: 476, 765, 901 =17x[45, 28, 53] P=2142 A=182070 r=170 m=. n=.
      2: 424, 795, 901 =53x[15, 8, 17] P=2120 A=168540 r=159 m=. n=.
      3: 451, 780, 901 primitive P=2132 A=175890 r=165 m=26 n=15
      4: 60, 899, 901 primitive P=1860 A=26970 r=29 m=30 n=1
    • Triples with hypotenuse=90001:
      1: 600, 89999, 90001 primitive P=180600 A=26999700 r=299 m=300 n=1
    and another pattern jumps out:
    899, 60, 901
    89999, 600, 90001
  12. Find a formula for one of the patterns in the Further Triple Patterns.

Links and References for Further Reading

Book: a book
Article: an article, usually in an academic periodical
WWW: a link to a web page
Book: Recreations in the Theory of Numbers - The Queen of Mathematics Entertains by A H Beiler, Dover, 1964,
was the first book that opened my eyes to the wonderful fun and facts about simple numbers. There is a whole chapter on Pythagorean triangles: The Eternal Triangle. This book has been in print now for many years and is a real classic, being both readable and full of interesting facts and tables and certainly accessible to anyone with an interest in "recreational" mathematics and numbers. The sub-title of the book is The Queen of Mathematics Entertains which comes from a quote of Karl Frederich Gauss: Mathematics is the queen of the sciences and arithmetic the queen of mathematics. Highly recommended!
Book: Mathematical Recreations (second revised edition) by Maurice Kraitchik, Dover, 1953,
is another very enjoyable book that will appeal to anyone who likes "playing with numbers". Apart from a chapter on the classic numerical pastimes and number puzzles, it has others on Magic Squares, Chess board problems, Permutations, Geometrical recreations and puzzles and a chapter on the Calendar. But I list it here because of chapter 4 devoted completely to the Pythagorean Triangles called Arithmetico-Geometrical Questions. It has the details of the algorithms used in the Calculators on this page.
This continues to be one of my favourite recreational mathematics books, of interest to anyone with just a basic mathematical knowledge and a love of numbers. It is available second-hand from as little as less than two US dollars at Amazon.com!
Book: Mathematical Recreations and Essays W W Rouse Ball, H S M Coxeter, Dover (13th edition 1987), paperback, 428 pages.
This is another of the few great classics on mathematical recreations many of a geometrical nature. There is a fascinating chapter on people with the most amazing ability to do arithmetic calculations in their heads. For us here, there is only a short section on Pythagorean triangles, but, if you have found this web page of interest, I am sure that you will find much to stimulate your own investigations in this book. It rarely uses mathematics taught beyond age 16. It really is a book packed full of so many interesting and tantalising tit-bits of mathematics that it makes you want to get out a pencil and paper and play with the numbers for yourself.
Book: The Book of Numbers by John Horton Conway and Richard K. Guy, Copernicus Books (1996), 311 pages, hardback.
This is nothing to do with a book of the Old Testament :-) as they quip in their introduction, but a collection of interesting mathematics looking at our attempts to get to grips with the idea of number: number words in many languages and the many different ways to write numbers as well as numbers in mathematics. Much of it is at school-maths level but some of it goes beyond that (imaginary, transcendental and infinite numbers). However, don't let that put you off as the book is full of diagrams and pictures and explanations making it all readily accessible. The chapter on Further Fruitfulness of Fractions shows how Pythagorean triangles were used by the Babylonians of 1500BC, well before the time of Pythagoras around 600BC as discovered in a little clay tablet called Plimpton Tablet 322 (now in the Columbia University Library).
Book: Number Theory and Its History Oystein Ore, Dover (1988), 380 pages, paperback
is a great book if you want to look more seriously at the mathematics of primes and factors, congruences (the arithmetic of remainders on division) - a topic called Number Theory - all in the context of their history by an excellent writer. There is a section on the Plimpton Tablet 322 (not 332 as he mistakenly labels his picture of it), a Babylonian list of Pythagorean triples and how it might have been used by the Babylonians.
Book: The Penguin Dictionary of Curious and Interesting Numbers David Wells, Penguin (Revised edition 1998), will help answer some of the puzzle questions above but is a curious and interesting book in its own right! Take a number such as 3.14159.. . No doubt you will recognise it but what about 1634 or 364.2422? (Let your mouse rest on the numbers for the answers!) And how many number facts do you know about 28? This book is full of wonderful facts about your favourite numbers.
Article: When is n a member of a Pythagorean triple? Dominic and Alfred Vella, Mathematical Gazette Note 87.04, pages 102-105, vol 87 (2003). This, with some others on Pythagorean triples are available in PDF format from Dominic Vella's mathematics page.
Article: A new algorithm for generating Pythagorean triples (PDF file) by R. H. Dye and R. W. D. Nickalls in The Mathematical Gazette (1998), volume 82, pages 86-91. The link is to an online PDF file of the article.
WWW: Online Encyclopedia of Integer Sequences is Neil Sloane's excellent resource for both checking series of integers and also finding out more about each one. It is the world-wide resource for such information and Neil welcomes any additional new series as well as more information on the individual sequences.
WWW: All the primitive triads for hypotenuse up to 10000. Michael Samos has produced this text file table together with the perimeter and area of all the triangles (and other information on the angles too) if you want a complete list to print.
WWW: Pythagorean Triples Projects is Eric Rowland's useful page of further ideas for your own investigations together with some hints and solutions.

Valid CSS! Valid HTML 4.01! © 1996-2006 Dr Ron Knott enquiry at ronknott dot com
updated 27 April 2006