I'm learning about $\log_2$ for an algorithms class and theres a problem in the book that is confusing me.
It asks:
Find a formula for $\log_2(n!)$ using Stirling's approximation for $n!$, for large $n$.
Stirling's approximation for $n!$ is $\sqrt{2\pi n}(\frac{n}{e})^n$
Does anyone have guidance on how to go about creating this formula?
Thanks
$$\log{n!} \simeq \log{\sqrt{2\pi n}\left(\frac{n}{e}\right)^n}=\frac{1}{2}+\frac{1}{2}\log\pi n+n\log n -n\log e=$$
$$\frac{1}{2}(1+\log\pi)-n\log e+\log n \left(\frac{1}{2}+n\right)$$