Pythagorean Triple Calculator

Return

This program generates pythagorean triples. These are solutions to the equation a^2 + b^2 = c^2 where a, b and c are all integer valued. You input an integer and press 'Generate' and the program will spit out all the pythagorean triples for each integer up to and including the entered integer.

CAUTION: Entering a number over 400 can take a while. I wouldn't recommend over 600 unless you have a lot of time on your hands.

It is interesting to note if the lowest number in a triple is prime then there are no other triples with that lowest number.

Challenge: Can you prove this to be true?

Hint: Write a^2 + b^2 = c^2 as a^2 = c^2-b^2 and factor



To view code: Right Click --> View Page Source