How do I prove that $x^{\phi(m)+1}\equiv x\pmod{p}$ when $m=pq$, two distinct primes? I kind of have an idea that it involves Euler's Theorem but it doesn't seem to be working as well as I wanted it to.
2 Answers
$$\phi(m)=\phi(pq)=\phi(p)\phi(q)$$ Hence $x^{\phi(m)+1}={(x^{\phi(p)})}^{\phi(q)}x^1$; the result now follows by Fermat's Little Theorem or Euler's Theorem, assuming $p\nmid x$. If $p|x$, of course, both sides are zero modulo $p$.
- 82,796
Euler's theorem says $x^{\phi(m)} \equiv 1 \pmod m$, which implies $$x^{\phi(m)+1} = x^{\phi(m)}x \equiv 1x \equiv x \pmod m.$$ Now, $p$ divides $m$, and $m$ divides $x^{\phi(m)+1}-x$, so by transitivity of divisibility, $p$ divides $x^{\phi(m)+1} - x$, which is to say $x^{\phi(m)+1}\equiv x \pmod p$.
Update: Euler's theorem can only be applied if $x$ and $m$ are coprime. If $d = \gcd(x, m)$ isn't $1$, then it's one of $\{p, q, m\}$. If $d=q$, we're set: $$x^{\phi(m)} = \left(x^{p-1}\right)^{q-1} \equiv 1^{q-1} = 1 \pmod p$$ by Fermat's little theorem, and the result follows on multiplying by $x$.
If $d = p$ or $m$, then $p \mid d \mid x$ implies $x \equiv 0 \pmod p$, and so, obviously, $x^{\phi(m)+1} \equiv 0 \equiv x \pmod p$.
- 7,601
-
Euler's theorem, as usually quoted, requires that $x$ is coprime to $m$. – hmakholm left over Monica Dec 16 '14 at 23:51
-
Good call. I'll update the answer. – Unit Dec 17 '14 at 00:54