A generalization of Fermat's little theorem that applies to not only prime numbers but also composite numbers.