FERMAT'S LITTLE THEOREM

Statement: if p is prime and a is not divisible by p then
    a^(p-1) = 1 (mod p)
Other form: a^p = a (mod p) for any a.

Use: modular inverse and primality testing.
    a^(-1) = a^(p-2) (mod p)

Steps:
1. Take a prime p (13) and some values of a.
2. Calculate a^(p-1) mod p using pow(a, p-1, p).
3. Every result is 1, so the theorem is verified.
4. Inverse of 5 mod 13 = 5^11 mod 13 = 8  (5*8 = 40 = 1 mod 13).
5. For a non prime like 12 the result is not 1, so the rule fails.
