I am working on a program in which I have calculated a number of type long
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 GCD == 1
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.
Edit
Condition for generating relative prime is such that:
1 < relative prime < generated Number
Any help is appreciated.