Introduction
Lesson 15 of 20 in Coddy's Mathematical Riddles course.
A Pythagorean triplet {a,b,c} is a set of three natural numbers, a < b < c, for which,
a2 + b2 = c2
For example, 32 + 42 = 9 + 16 = 25 = 52.
Note: natural number is a non-negative integer {1,2,3,4,...}
Proof that for any n < m natural number, the triple {2mn, m2-n2, m2+n2} is a A Pythagorean triplet.
Given the triple: {a=2mn, b=m2-n2, c=m2+n2}
Proof that: a2 + b2 = c2.
Proof:
a2 + b2 =
(2mn)2 + (m2-n2)2 =
4m2n2 + m2 - 2m2n2 + n4 =
m4 + 2m2n2 + n4 = (m2+n2)2 = c2
Try it yourself
This lesson doesn't include a code challenge.