Corollary. The Freshman’s Dream [01BH]
- September 29, 2026
- Marcelo Fiore, Jon Sterling
For all natural numbers m,n and primes p we have (m+n)^p \equiv m^p + n^p \mod p \text {.}
Proof.
- September 29, 2026
- Marcelo Fiore, Jon Sterling
Let m,n be natural numbers and let p be a prime. It suffices to show that the difference (m+n)^p - (m^p+n^p) is congruent to zero modulo p. First we calculate (m+n)^p using the Binomial theorem and extracting the first and last summands:
\begin {aligned} (m+n)^p &= \sum _{k=0}^p {p \choose k} m^{p-k} n^k \\ &= {p\choose 0}m^p + {p\choose p}n^p + \sum _{k=1}^{p-1} {p\choose k}m^{p-k} n^k \\ &= m^p + n^p + \sum _{k=1}^{p-1} {p\choose k}m^{p-k} n^k \end {aligned}Therefore we have:
(m+n)^p - (m^p +n^p) = \sum _{k=1}^{p-1} {p\choose k}m^{p-k} n^kBy Proposition [01BF], we know that {p\choose k} \equiv 0 \mod p when 0<k<p, so the sum above is itself congruent to 0 modulo p. (For this, we are using the fact that sums and products and powers preserve congruence, which we have technically not proved.)