I wonder if I have found the most efficient way of finding any pythagoras triple with a given hypotenuse that has not been published?(adsbygoogle = window.adsbygoogle || []).push({});

My method uses a trial and error search, but with the limits set to minimize the number of trials as follows:

Try odd values X within the limits of int(C^0.5) +1 to int(2.C)^0.5 inclusive such that

2.C - X^2 = Y^2. C being the required hypotenuse. {This is always possible and in a number of ways depending on the number (at least one) of prime factors of form 4n+1 in C.}

Then the required value of one side of the triangle is given by X.Y

Example C= 65

lower limit = 9 upper limit = 11

X = 11, Y = 3 or X = 9 Y = 7

33^2 + 56^2 = 65^2 or 63^2 + 16^2 = 65^2

These are primitive solutions, but non primitive ones can be found by applying the above method to C = 5 or 17 and then multiplying the three sides by 17 or 5.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Hypotenuse as required

Tags:

Loading...

Similar Threads - Hypotenuse required | Date |
---|---|

B What is the requirement for something to qualify as vector? | Aug 28, 2017 |

B Proofs: Hypotenuse is the longest side of a right triangle | Jul 24, 2016 |

I Curl from requiring invariance under inertial coordinate changes | May 14, 2016 |

What is required to write a mathematical theory? | Oct 7, 2014 |

Can one Calculate Hypotenuse in Following Case? | Dec 4, 2004 |

**Physics Forums - The Fusion of Science and Community**