Pythagorean Triples Theorem
Pythagorean Triples Theorem
A primitive Pythagorean triple (or PPT for short) is a triple of integers such that , , and have no common factors and satisfy: +=
(a,b,c)
a
b
c
2
a
2
b
2
c
Theorem 2.1 (Pythagorean Triples Theorem). We will get every primitive Phythagorean triple with odd and even by using the formulas , , where are chosen to be any odd integers with no common factors.
(a,b,c)
a
b
a=st
b=(-)
1
2
2
s
2
t
c=(+)
1
2
2
s
2
t
s>t≥1
For example, taking in Theorem 2.1 gives a triple whose and entries differ by 1. This explains many of the examples that we listed. The following table gives all possible triples with :
t=1
s,-1,+1
2
s
2
2
s
2
b
c
s≤11
In[]:=
primitivePythagoreanTriplesTable[11]
Out[]//TraditionalForm=
s | t | ast | b 1 2 2 s 2 t | c 1 2 2 s 2 t |
3 | 1 | 3 | 4 | 5 |
5 | 1 | 5 | 12 | 13 |
7 | 1 | 7 | 24 | 25 |
9 | 1 | 9 | 40 | 41 |
11 | 1 | 11 | 60 | 61 |
5 | 3 | 15 | 8 | 17 |
7 | 3 | 21 | 20 | 29 |
11 | 3 | 33 | 56 | 65 |
7 | 5 | 35 | 12 | 37 |
9 | 5 | 45 | 28 | 53 |
11 | 5 | 55 | 48 | 73 |
9 | 7 | 63 | 16 | 65 |
11 | 7 | 77 | 36 | 85 |
11 | 9 | 99 | 20 | 101 |
2.4 In our list of examples are the two primitive Pythagorean triples += and +=Find at least one more example of two primitive Pythagorean triples with the same value of . Can you find three primitive Pythagorean triples with the same ? Can you find more than three?
2
33
2
56
2
65
2
16
2
63
2
65
c
c
In[]:=
sameValuePPTTable[100]
Out[]//TraditionalForm=
2 25 | = | 2 7 2 24 | 2 15 2 20 | | |
2 50 | = | 2 14 2 48 | 2 30 2 40 | | |
2 65 | = | 2 16 2 63 | 2 25 2 60 | 2 33 2 56 | 2 39 2 52 |
2 75 | = | 2 21 2 72 | 2 45 2 60 | | |
2 85 | = | 2 13 2 84 | 2 36 2 77 | 2 40 2 75 | 2 51 2 68 |
2 100 | = | 2 28 2 96 | 2 60 2 80 | | |
Mathematica code
Mathematica code
primitivePythagoreanTriplesTable[n_]:=TraditionalFormGridJoins,t,a==st,b==-,c==+,SelectFlattenTableIfGCD[t,s]1,s,t,st,-,+,{},{t,1,n-2,2},{s,t+2,n,2},1,#≠{}&,FrameAll,Background{{LightGray,White,LightGreen,LightBlue,LightPurple},{{LightGray,White}}}
2
s
2
t
2
2
s
2
t
2
2
s
2
t
2
2
s
2
t
2
sameValuePPTTable[m_]:=TraditionalForm[Grid[Select[Table[Join[,"=",Map[Plus@@&,Rest[PowersRepresentations[,2,2]]]],{n,1,m}],Length[#]>3&],FrameAll,Background{{{LightOrange,LightRed,LightGreen,LightBlue,LightPurple,LightCyan}},{{LightGray,White}}}]]
HoldForm[2]
n
HoldForm[2]
#
2
n