title: Calculating a relative Prime of a number in JAVA?
body: <p>I am working on a program in which I have calculated a number of type <code>long</code> after applying some calculations according to my algorithm. Now, I have to find a relative prime to this number that I have generated. How can I do this? I know that if two numbers are relative prime then their <code>GCD == 1</code> but in this case I don't have another number. I have only one number which is getting generated in my program and I need to calculate a relative prime number for this number. </p>
  
  <p><strong>Edit</strong></p>
  
  <p>Condition for generating relative prime is such that:</p>
  
  <p><code>1 &lt; relative prime &lt; generated Number</code></p>
  
  <p>Any help is appreciated.  </p>