Power of Sum Modulo Prime

Theorem
Let $p$ be a prime number.

Then:
 * $\paren {a + b}^p \equiv a^p + b^p \pmod p$

Proof
From the Binomial Theorem:
 * $\ds \paren {a + b}^p = \sum_{k \mathop = 0}^p \binom p k a^k b^{p - k}$

Also note that:
 * $\ds \sum_{k \mathop = 0}^p \binom p k a^k b^{p-k} = a^p + \sum_{k \mathop = 1}^{p - 1} \binom p k a^k b^{p - k} + b^p$

So:

Also see

 * Freshman's Dream


 * Prime Power of Sum Modulo Prime