title: Solve an equation containing three unknown prime numbers
body: <p>I was recently asked a question in an interview &amp; have been unable to crack it, after my own efforts have failed &amp; Google not showing any results , I am posting it here so that anyone else may also try their hand on it .</p>
  
  <p>Given the equation:</p>
  
  <blockquote>
  <pre><code>a (a + b) = c - 120
  </code></pre>
  </blockquote>
  
  <p>where <code>a</code>,<code>b</code> &amp; <code>c</code> are unequal prime numbers, find <code>a</code>, <code>b</code> &amp; <code>c</code>.</p>
  
  <p>I know I must use some property of the prime numbers to reduce the problem to a simpler one, but I can't think of one. Any suggestions/solutions will be appreciated.</p>
  
  <p>The best I could come up with is that : </p>
  
  <ul>
  <li>There may be multiple solutions to it. My first approach was a brute force search for 3 prime numbers that solved this equations. (I know , totally useless) </li>
  <li>The second approach was a refinement of the first, to modify the equation to <code>a (a + b) - 120 = c</code>. So now we reduce our brute force variables to just a &amp; b &amp; check if the LHS is prime no for the selected <code>a</code> &amp; <code>b</code>. (If <code>c</code> were to be large, finding out whether the LHS is a prime would take away the advantage gained by reducing the variables from 3 to 2.)</li>
  </ul>
  
  <p>So you see, I am not really going anywhere.</p>