<s>[INST] Middle binomial coefficient mod 4 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.
 [/INST] 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$.
</s>