Two numbers are relative prime if their greatest common divisor is $1$, that is $gcd(n,a)$. We can also find no of elements that are relative prime to given number by Euler function.
How can I find a number suppose '$a$' that is relative prime to my given number let's say '$n$' and is smaller than '$n$'? Ideally I want smallest number that is relative prime to $n$ except $1$.