Elementary Number Theory – Proving Congruence of $p^{q-1}+q^{p-1} \equiv 1 \pmod{pq}$

elementary-number-theory

If $p$ and $q$ are distinct primes , prove that $$p^{q-1}+q^{p-1} \equiv 1 \pmod {pq}$$


Using Fermat's Theorem we can get $$p^{q-1} \equiv 1 \pmod q, \qquad q^{p-1} \equiv 1 \pmod p.$$

After that I have no idea at all. Can anyone help me please

Best Answer

$p^{q-1}+q^{p-1}\equiv p^{q-1}\pmod q$

Now using Fermat's Little Theorem $p^{q-1}\equiv1\pmod q\implies p^{q-1}+q^{p-1}\equiv 1\pmod q$

Similarly, $p^{q-1}+q^{p-1}\equiv 1\pmod p$

As $p$ and $q$ both divides $(p^{q-1}+q^{p-1}-1),$ lcm$(p,q)$ will divide $(p^{q-1}+q^{p-1}-1)$

Now, lcm$(p,q)=p\cdot q$

Generalization:

For any two distinct integer $m,n>1$ where $(m,n)=1,$

$(1):m^{\phi(n)}+n^{\phi(m)}\equiv1\pmod {m\cdot n}$ using Euler' Totient theorem

$(2):m^{\lambda(n)}+n^{\lambda(m)}\equiv1\pmod {m\cdot n}$ using Carmichael Function