Project Euler 9 - Special Pythagorean Triplet

Official link:

Thought Process

The key here is to to find an efficient way to generate the right angle triangles (Pythagorean Triples)

The following theorem is provided:

We just loop through m, n< sqrt(1000) return k^3*(a*b*c)

Proof of the above proof is given below

I will include the pythagorean Triplet generator in my Essential Functions

Interactive Code

Input an integer (yourinput)

Code will output the first Pythagorean Triplet such that a+b+c = yourinput