calculate special Pythagorean triplet