Source: https://www2.mat.ulaval.ca/fileadmin/Cours/MAT-3900/Tripletspythagoriciens.pdf