TITLE: Proof $\binom{p-1}{k}\equiv (-1)^k \mod{p}$
QUESTION [8 upvotes]: Proof that if $p$ is a prime odd and $k$ is a integer such that $1≤k≤p-1$ , then the binomial coefficient
$$\displaystyle \binom{p-1}{k}\equiv (-1)^k \mod p$$
This exercise was on a test and I could not do!!

REPLY [4 votes]: In characteristic $p$, where $p$ is odd,
$$(1+X)^{p-1} = \frac{(1+X)^p}{1+X} = \frac{1+X^p}{1+X} =  \frac{1-(-X)^p}{1-(-X)} = 1 -X + X^2 - \dots +X^{p-1}.$$