It is known that the middle binomial coefficient is always even. Show that $\binom{2n}{n}= 2 \mod 4$ if and only if $n$ is a power of 2.
-
Hint: the number of powers of $2$ which divide $n!$ is $[n/2]+[n/4]+[n/8]+\ldots$ where $[x]$ is the largest integer less than or equal to $x$. – Aaron Jul 28 '14 at 15:14
3 Answers
let $\sigma(n)$ be the sum of the digits in the binary representation of $n$. then the highest power of $2$ dividing $n!$ is $n-\sigma(n)$. obviously $\sigma(2n)=\sigma(n)$ so the highest power of $2$ dividing $\binom{2n}{n}$ is: $$ 2n - \sigma(2n) - 2 (n - \sigma(n)) = \sigma(n) $$ this implies $\binom{2n}{n}$ is divisible by $4$ unless $\sigma(n)=1$, i.e. $n$ is a power of $2$

- 18,040
Thanks to Kummer's theorem ${n+m \choose m}$ is divisible by at most $2^c$ where $c$ is the number of carries while adding $n$ and $m$ in base $2$. In this case $n = m$, and the number of carries adding $n$ with itself will be greater than $1$ unless $n$ is a power of two and thus it has only one digit $1$ in its binary representation.

- 2,573
The power of $2$ in $\binom{2n}{n}$ is
$$\lfloor \frac{2n}{2} \rfloor +\lfloor \frac{2n}{2^2} \rfloor +\lfloor \frac{2n}{2^3} \rfloor + ... -2 \left(\lfloor \frac{n}{2} \rfloor +\lfloor \frac{n}{2^2} \rfloor +\lfloor \frac{n}{2^3} \rfloor +...\right) \\ =\lfloor \frac{2n}{2} \rfloor - \left(\lfloor \frac{n}{2} \rfloor +\lfloor \frac{n}{2^2} \rfloor +\lfloor \frac{n}{2^3} \rfloor +...\right)\\ =n - \left(\lfloor \frac{n}{2} \rfloor +\lfloor \frac{n}{2^2} \rfloor +\lfloor \frac{n}{2^3} \rfloor +...\right)$$
Now the problem asks you to prove that $$n - \left(\lfloor \frac{n}{2} \rfloor +\lfloor \frac{n}{2^2} \rfloor +\lfloor \frac{n}{2^3} \rfloor +...\right)=1$$ if and only if $n$ is a power of $2$.
This is equivalent to $$\lfloor \frac{n}{2} \rfloor +\lfloor \frac{n}{2^2} \rfloor +\lfloor \frac{n}{2^3} \rfloor +... =n-1$$ if and only if $n$ is a power of $2$.
Now write $n=2^k+l$ with $l <2^k$. Then,
$$n-1= \lfloor \frac{n}{2} \rfloor +\lfloor \frac{n}{2^2} \rfloor +\lfloor \frac{n}{2^3} \rfloor +...+\lfloor \frac{n}{2^k} \rfloor \leq \frac{n}{2} + \frac{n}{2^2} + \frac{n}{2^3} +...+ \frac{n}{2^k} \\ =n (1-\frac{1}{2^k})=n-1-\frac{l}{2^k}$$ This inequality implies $l=0$.

- 132,525