TITLE: Show that the cardinal of $ A := \left\{ k \in \mathbf{Z} | 0 \leq k \leq n \text{ and } \binom{n}{k} \text{ is odd} \right\} $ is a power of 2
QUESTION [5 upvotes]: Let $ A := \left\{ k \in \mathbf{Z} | 0 \leq k \leq n \text{ and } \binom{n}{k} \text{ is odd} \right\}  $. 
I must show that the cardinal of $A$ is a power of 2.
I have tried to show that there exist a bijection between $A$ and the set of subparts of another set, but unsuccessfully.
I also thought about trying to show that the cardinal of $A$ must divide the cardinal of $ P(\left\{ k \in \mathbf{Z} | 0 \leq k \leq n \right\}) $ (it is $ 2^{n+1} $), which would ensure the result, but I do not think this a good path.
Are there simple arguments to show that ?

REPLY [3 votes]: Let $n=a_r\cdot2^r+\cdots+a_1\cdot2+a_0$ where all $a_i\in\{0,1\}$. For $0\le k\le n$ let $k=b_r\cdot2^r+\cdots+b_1\cdot2+b_0$ where all $b_i\in\{0,1\}$.
For convenience, denote $Z=\{i:a_i=0\}$ and $N=\{i:a_i=1\}$. Then Lucas Correspondence tells us that 
$\binom{n}{k}$ is odd if and only if $\prod_{i\in Z}\binom{0}{b_i}\cdot\prod_{j\in N}\binom{1}{b_j}=1$. Since $b_i,b_j\in\{0,1\}$, we can conclude that $\binom{n}{k}$ is odd if and only if $b_i=0$ for all $i\in Z$. This implies that the number of integers $k$ such that $\binom{n}{k}$ is odd is exactly $2^{|N|}$.