This is a translation of http://setosa.io/pythagorean/