I want to find a general solution for $x^2 \equiv x \bmod p$, where $p$ is a prime.
It is easy to see that if $x \equiv 0 \bmod p$ or $x \equiv 1 \bmod p$ , the equation holds.
I got these solutions, but I was not able to figure out any other solutions. which, intuitively, would not seem necessarily wrong.
Is it true that there is never any other solution? and if so how is this provable?
Thank you,
V.