Find all the $x$ such that $N \mod x = 1$

116 Views Asked by At

Find all the $x$ such that $N \mod x = 1,$ where $x < N$ and $N$ is a big integer.

Please help me find a solution, or tell me if this is not a simple task to do.

1

There are 1 best solutions below

0
On BEST ANSWER

$N \bmod x=1$ means $x $ divides $N-1$,

so finding all the $x$ such that $N\bmod x=1$ is as hard as factoring $N-1$.