TITLE: Prove that $2^n$ does not divide $n!$
QUESTION [11 upvotes]: I want to prove that $2^n$ does not divide $n!$.
I was trying by induction and I'm confused about if what I'm doing is right.
First I test it with $n=1$. In fact:
$$2^1 \nmid 1!$$
So if i take the I.H. as $2^n \nmid n!$ and I try to prove it for $n+1$:
$$2^{n+1} \nmid (n+1)!$$
$$2^{n} \cdot 2 \nmid (n+1) \cdot n!$$
As  $2^n \nmid n!$ it must be that $2^n$ divides $n+1$, so I need to prove that it doesn't. If I try by induction again I must have $n>1$ for it to be true:
$$P(n) = 2^n \nmid n+1$$
$$P(n+1) = 2^n \cdot 2 \nmid n+1+1$$
but $2^n \nmid n+1$ and $2^n \nmid 1$
because $n>1$
So my question is obviously if this is correct. I'm doubting because the exception I have to do with $n$ being greater than 1 for the second part. If I made a mistake could you point to me in a better direction? I'm sure there must be a simpler way to prove this.
Thanks!

REPLY [2 votes]: As pointed out in the other answers we can write the maximum power of $2$ that divides $n!$ as $\nu_2(n!) = \sum_{k\geq 0}\left\lfloor\frac{n}{2^k}\right\rfloor$. We can give a simple interpretation of this number by working in binary. The binary expansion of $n$ is $n = \sum_{k\geq 0} a_k 2^k$ with $a_k\in\{0,1\}$. Using this we find
$$\matrix{\nu_2(n!) &=& \sum_{k\geq 0}\left\lfloor\sum_{i\geq 0} a_i 2^{i-k}\right\rfloor \\= \sum_{k\geq 0}\sum_{i\geq k} a_i 2^{i-k} &=& \sum_{k\geq 0} a_k(1+2+4+\ldots + 2^{k-1}) \\= \sum_{k\geq 0} a_k(2^k-1) &=& n - \sum_{k\geq 0} a_k}$$
Thus 
$$\nu_2(n!) = n - s_2(n)$$
where $s_2(n)$ is the sum of the binary digits of $n$. If $n>0$ then the binary expansion of $n$ must contain atleast one "$1$" so $\nu_2(n!) < n$ follows. The minimum value of $s_2(n)$ for $n>0$ occurs if $n$ is on the form $2^k$ for which $s_2(n) = 1$ and $v_2(n!) = n-1$.