# Does $N! = 2^m$ hold for any integer values of $N$ and $m$?

For any value of $$N$$, is it possible that the factorial of $$N$$ is equal to a power of 2?

• $2!=2^1$ and $0!=2^0$. Those are the only ones. – AugSB Feb 8 at 18:05
• @AugSB also $1!=2^0$ – J. W. Tanner Feb 8 at 18:11
• @J.W.Tanner True! I also had that one in mind, but I forgot to add it! – AugSB Feb 8 at 18:52

## 1 Answer

If $$N \ge 3$$ then $$3$$ will divide $$N!$$ but $$3$$ will never divide a power of $$2$$.

====

We can find the prime factorization of $$N!$$ by noting the following:

If we list the prime numbers in order as $$p_1, p_2,p_3,....$$ etc. the there is a specific prime $$p_n \le N < p_{n+1}$$. So the prime factors of $$N!$$ are $$p_1,...., p_n$$. A multiple of prime $$p_k$$ will appear $$\lfloor \frac np_{k} \rfloor$$ times so $$p_k^{\lfloor \frac np_{k} \rfloor}$$ will divide $$N!$$. Furthermore $$p_k^2$$ will appear $$\lfloor \frac n{p_{k}^2} \rfloor$$ times and so on.

So $$N! = \prod\limits_{p_k\text{ is prime;}\\p_i \le N}p_k^{(\sum\limits^{i=1\\p_k^i\le N}\lfloor \frac n{p_{k}^i} \rfloor)}$$