For what $n$ will $\binom{n}{k}$ be odd for all $0 \leq k \leq n$?
I. solution. $n=1$ clearly satisfies, $n=2$ does not: $\binom{1}{0}=\binom{1}{1}=1$ is odd, but $\binom{2}{1}=2$ is even. For the rest, let $n$ be an integer greater than 2 that satisfies the conditions. It is known that

$$
\binom{n}{k}=\frac{n(n-1) \ldots(n-k+2)(n-k+1)}{k!}
$$

If $\binom{n}{1}=n$ is odd, then $\binom{n}{2}=n \frac{n-1}{2}$ can only be odd if $n-1$ is even but not divisible by four. If $n>4$, then consider the number $3\binom{n}{4}=\frac{n(n-1)}{2} \cdot(n-2) \frac{n-3}{4}$. This is odd, and $\frac{n(n-1)}{2}=\binom{n}{2}$ is also odd, $n-2$ is an odd integer, so $\frac{n-3}{4}$ must also be an integer. Therefore, $n-3$ is divisible by four. If now $n>2^{l}$, then similarly, $\left(2^{l}-1\right)\binom{n}{2^{l}}$ is an odd integer, on the other hand

$$
\begin{gathered}
\left(2^{l}-1\right)\binom{n}{2^{l}}=\frac{n \cdot(n-1) \cdot \ldots \cdot\left(n-2^{l}+3\right)}{\left(2^{l}-2\right)!} \cdot\left(n-2^{l}+2\right) \cdot \frac{n-2^{l}+1}{2^{l}}= \\
=\binom{n}{2^{l}-2}\left(n-2^{l}+2\right) \cdot \frac{n-2^{l}+1}{2^{l}}
\end{gathered}
$$

Here, the left side and the first two factors on the right side are odd integers, so $2^{l}$ must divide $(n-2^{l}+1)$. We have found that whenever $2^{l}1$. Since $2^{L}$ is greater than 1 and among the numbers less than $(2^{L}+1)$, only it divides itself, therefore $2^{L}=n-2^{L}+1$, so $n=2^{L+1}-1$.

We have found that if $\binom{n}{k}$ is odd for every $k$, then either $n=1$ or $n=2^{L+1}-1$ where $L \geqq 1$.

Now we show that the found condition is sufficient, that is, if $n=2^{L+1}-1$, then

$$
\binom{n}{k}=\binom{2^{L+1}-1}{k}=\frac{2^{L+1}-1}{1} \cdot \frac{2^{L+1}-2}{2} \cdot \frac{2^{L+1}-3}{3} \cdot \ldots \cdot \frac{2^{L+1}-k}{k}
$$

is odd for every $1 \leqq k \leqq 2^{L+1}-1$.

Indeed: if $1 \leqq j \leqq 2^{L+1}-1$, then the $j$-th factor of the above product, $\frac{2^{L+1}-j}{j}$, can be simplified to a fraction where both the numerator and the denominator are odd integers. Write $j$ in the form $2^{m} \cdot j^{\prime}$, where $m \geqq 0$ is an integer and $j^{\prime}>0$ is odd. Since $2^{m} \leqq j<2^{L+1}$, it follows that $m \leqq L$. Consequently,

$$
\frac{2^{L+1}-j}{j}=\frac{2^{m}\left(2^{L+1-m}-j^{\prime}\right)}{2^{m} j^{\prime}}=\frac{2^{L+1-m}-j^{\prime}}{j^{\prime}}
$$

Here, $j^{\prime}$, and thus $2^{L+1-m}-j^{\prime}$, are odd integers, as stated.

Therefore, $\binom{2^{L+1}-1}{k}$ is an integer for every $1 \leqq k \leqq 2^{L+1}-1$, and it is the product of fractions where both the numerator and the denominator are odd. This implies that $\binom{2^{L+1}-k}{k}$ can only be an odd integer. Finally, $\binom{2^{L+1}-1}{0}=1$ is also odd.

We have thus shown that $\binom{n}{k}$ is exactly odd for every $0 \leqq k \leqq n$ if $n=2^{m}-1$ where $m \geqq 2$. (For $L \geqq 1$.) Finally, for $