Proving identities (mod $pq$) using Fermat's little theorem? I have come across this question, which reminded me of Fermats little theorem, i dont know if the Fermats theorem is actually in use in the following mathematical statements 
an integer a is a coprime with p and a coprime with q (p and q are different prime numbers )then prove that
$$a^{(p-1)(q-1)} \equiv 1(\operatorname{mod} pq) $$
$$p^{q-1}+q^{p-1} \equiv 1(\operatorname{mod} pq)$$
any help would be appreciated, thanks in advance.   

These are really Chinese Remainder Theorem problems.  First look mod $p$, then mod $q$.  IF the expression is congruent to the same thing mod $p$ and $q$, then CRT says they're also congruent to that "same thing" mod $pq$.  
For the second problem $p^{q-1}+q^{p-1} \equiv p^{q-1} +0 \equiv 1 (\bmod{q})$ by Fermat's little theorem.  Likewise $p^{q-1}+q^{p-1} \equiv 1 (\bmod{p})$.  So by CRT $p^{q-1}+q^{p-1} \equiv 1 (\bmod{pq}).$
The first problem has the same flavor.
