Fermat's Last Theorem is an important theorem in number theory. Its content is: If p is a prime number and (a, p)= 1, then A (p- 1) ≡ 1 (mod p). That is, if p is prime, a and p are coprime.