Skip to main content
1 of 3

Smallest solution to $x^2 \equiv x~(mod~n)$

Given $n$, is it possible to upper bound the smallest $x > 1$ that satisfies the congruence $x^2 \equiv x~(mod~n)$? Obviously when $n$ is prime power $x = n$, and we are in the worst situation. However for other $n$ we can make $x \leq \frac{n}{2}$. Perhaps better bounds can be obtained if we know that $n$ has more prime factors.