Prove that $\binom{n} k$ is even for all $k$ between $1$ and $n-1$, if and only if $n$ is a power of $2$.
I have tried strong induction on Pascal's triangle but I've got nowhere. I think that there is a generating function approach to this question that I'd like to find.