Euler's phi function (n) is the size of Z*n = { : gcd(a,n) = 1}, the multiplicative group mod n. (p) = p-1 if p is prime.
Euler's Theorem
For any integer n > 1, (mod n) for all .
Fermat's Theorem
If p is prime, then (mod p) for all .