What is a pythagorean triple
https://commons.wikimedia.org/wiki/File:Pythagorean.svg#/media/File:Pythagorean.svg
A Pythagorean triple consists of three positive integers a, b, and c, such that a2 + b2 = c2. Such a triple is commonly written (a, b, c), and a well-known example is (3, 4, 5). If (a, b, c) is a Pythagorean triple, then so is (ka, kb, kc) for any positive integer k.
Generating a triple:
A fundamental formula for generating Pythagorean triples given an arbitrary pair of positive integers m and n with m > n. The formula states that the integers
$$a = m^2 - n^2 ,\ \, b = 2mn ,\ \, c = m^2 + n^2$$
or
$$a = k\cdot(m^2 - n^2) ,\ \, b = k\cdot(2mn) ,\ \, c = k\cdot(m^2 + n^2)$$
form a Pythagorean triple.
Example:
$$\\ \text{If } m=2 \text{ and } n = 1:\\
a= 2^2-1^2 =4 - 1 = 3 \\
b = 2\cdot 2 \cdot 1 = 4 \\
c = 2^2 + 1^2 = 4+1=5$$
Pythagorean triple (3, 4, 5), because $$\small{\text{$3^2+4^2=5^2$}}$$
.