Forum Expert Blazing goIITian
I am unable to edit my earlier post, but I just want to say that when we say that nr mod m+1 where r is prime to m+1 is the same as stating that n is prime to m+1.
So the condition is that n and m+1 are relatively prime