[Math] Given $p,q$ odd primes, prove that if $\gcd(a,pq)=1$ then $a^{\operatorname{lcm} (p-1,q-1)} \equiv 1 \pmod {pq}$

modular arithmeticnumber theory

Given $p,q$ odd primes, prove that if $\gcd(a,pq)=1$ then $a^{\operatorname{lcm} (p-1,q-1)} \equiv 1 \pmod {pq}$

What I am thinking:

I know by Fermat's that $a^{p-1} \equiv 1 \pmod p$ and also $a^{q-1} \equiv 1 \pmod q$. I need to combine them somehow. Should I use the chinese remainder theorem?

In which case what is the inverse of $p \bmod q$ and vise versa?

Best Answer

Use the Chinese Remainder Theorem as you have suggested. But the easiest way is to use it to check your answer, not to find the answer. Let's write $l={\rm lcm}(p-1,q-1)$.

We have $$a^{p-1}\equiv1\pmod p\ ,$$ and since $l$ is a multiple of $p-1$, $$a^l\equiv1\pmod p\ .$$ Similarly $$a^l\equiv1\pmod q\ .$$ Therefore $x=a^l$ is a solution of the simultaneous congruences $$x\equiv1\pmod p\ ,\quad x\equiv1\pmod q\ ;$$ but by CRT this system has a unique solution modulo $pq$, and $x=1$ is clearly a solution, so we have $a^l\equiv1\pmod{pq}$.

Related Question