Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do i prove the following theorem?

Supose $p$ is a prime number, $r,\ s$ are positive integers and $x$ is an arbitary integer. Then we have $x^r \equiv x^s\ (mod\ p)$ whenever $r \equiv s \ (mod \ p-1)$.

I'm thinking of using order of powers formula:

$m^r = 1\ (mod\ n)$

and FTL:

$a^{p-1} = 1 \ (mod \ p)$

but im not sure what to do really.

share|cite|improve this question
up vote 4 down vote accepted

Let $r > s$ then $x^{(r-s)} \equiv 1 \pmod p$ also $x^{(p-1)} \equiv1 \pmod p$ hence $p-1$ divides $r-s$ hence $r \equiv s (\mod (p-1))$

share|cite|improve this answer

Another approach: if $\,x=0\pmod p\,$ then the claim is trivial, so let us assume

$$x\neq 0\pmod p\Longrightarrow x\pmod p=:\overline x\in\left(\Bbb Z/p\Bbb Z\right)^*=:\Bbb F_p^*$$

Since $\,\Bbb F_p\,$ is a finite field, $\,\Bbb F_p^*:=\Bbb F_p\setminus\{0\}\,$ is a cyclic group of order $\,p-1\,$ , thus

$$x^r=x^s\pmod p\Longleftrightarrow x^{r-s}=1\pmod p\Longleftrightarrow (p-1)\mid(r-s)\Longleftrightarrow r=s\pmod{p-1}$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.