How to solve this congruence? $x^3 \equiv x \pmod{125}$

321 Views Asked by At

The question is in the title: for which $x$ $$x^3 \equiv x \pmod{125}\ ?$$ I'm fairly new to modular arithmetics and I can't quite grasp the not-so-basic things. Am I missing something?

1

There are 1 best solutions below

2
On BEST ANSWER

$x^3\equiv x\pmod{125}$ is equivalent to $125\mid x^3-x=(x-1)x(x+1)$. Note $125=5^3$.

$\gcd(x-1,x)=\gcd(x,x+1)=1$. If $5\mid x-1,x+1$, then $5\mid (x+1)-(x-1)=2$, contradiction, therefore we have three cases: $125\mid x-1$ or $125\mid x$ or $125\mid x+1$, so the answer is $x\equiv \{-1,0,1\}\pmod{125}$.