Artificial intelligent assistant

This is a problem that I encountered in elementary number theory How should I prove that $\dbinom{2n-1}{n}=\dfrac{(2n-1)!}{n!(n-1)!}$ is odd or even according to whether $n$ is, or is not, a power of $2$? I'm incapable of doing anything with this problem. Thank you in advance.

Denote for prime $p$ $$ \
u_p (m) = \max\\{s: p^s| m\\}. $$ It's enough to compute $\
u_2\dbinom{2n-1}{n}$. If it equals to $0$ then $\dbinom{2n-1}{n}$ is odd, otherwise it's an even number.

Then we can use direct application of Legendre's formula (see < for details). It says that $$ \
u_p(n!) = \frac{n-s_p(n)}{p-1}, $$ where $s_p(n)$ denotes the sum of the standard base-$p$ digits of $n$.

For $p=2$ we have $$ \
u_2\dbinom{2n-1}{n} = \
u_2((2n-1)!)-\
u_2((n!))-\
u_2((n-1)!) = $$ $$ =\big(2n-1 -s_2(2n-1)\big) - \big(n-s_2(n)\big) - \big(n-1 - s_2(n-1)\big) = $$ $$ = s_2(n)+s_2(n-1) - s_2(2n-1). $$ It remains to prove that $s_2(n)+s_2(n-1) - s_2(2n-1)$ equals to zero if and only if $n$ is a power of $2$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 5314e1dc1671276306d9096661a6ab50