title: Algorithm to determine whether a given number N can become hypotenuse of right triangle with all 3 integral sides
body: <p>Suppose you are given hypotenuse of a right angled triangle,then how can you determine whether there are two integral smaller sides possible with the given hypotenuse.</p>
  
  <p>For example, you are given hypotenuse as 5.Then you have to determine whether you have smaller integral sides for the given right triangle.The answer will be <code>yes</code> because we can have smaller sides as 3 and 4,hence getting a 3-4-5 right triangle.</p>
  
  <p>Similarly,for hypotenuse as 7 we can have no such right triangle.</p>
  
  <p><strong>In other words,we have to find whether a given number N can serve as hypotenuse for a right triangle with all 3 sides as integers.</strong></p>
  
  <p>I went through entire article on <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Pythag/pythag.html" rel="nofollow">Pythagorean triples</a> but still no success.I am confused what conditions to check.Please help.</p>