State the binomial theorem.
Prove that if \(p\) is a prime number, then \((x+y)^p \equiv x^p + y^p \pmod p\).
Solution
The binomial theorem states that for every nonnegative integer \(n\), \[ (x+y)^n=\sum_{k=0}^n\binom nk x^{n-k}y^k. \]
Let \(p\) be prime. For \(1\le k\le p-1\), \[ \binom pk=\frac{p!}{k!(p-k)!} \] is divisible by \(p\): the numerator contains the prime factor \(p\), while neither \(k!\) nor \((p-k)!\) does. Hence modulo \(p\) every intermediate binomial coefficient vanishes. Therefore, as a polynomial identity over \(\mathbb Z/p\mathbb Z\), \[ (x+y)^p\equiv x^p+y^p\pmod p. \] In particular the congruence holds after substituting any integers for \(x\) and \(y\).