For a prime and , write . The binomial theorem shows is divisible by : the linear term contains the extra factor and every higher term contains at least . Iteration gives the displayed modular congruence for every , including . Applied to Fermat's little theorem, it yields .