Based on the Wikipedia article on Stirling Approximation:
$n! = \sqrt{2 \pi n} \left(\frac{n}{e}\right)^n e^{\lambda_n}$
where $\frac{1}{12n+1} < \lambda_n < \frac{1}{12n}$
How would this apply to a difference of logarithms.
For example, if I am estimating the error for $\ln(\lfloor\frac{n}{2}\rfloor!) - \ln(\lfloor\frac{n}{3}\rfloor!)$, would the error estimate then be:
$\ln(\sqrt{2 \pi \frac{n}{2}} \left(\frac{n}{2e}\right)^{\frac{n}{2}}) - \ln(\sqrt{2 \pi \frac{n}{3}} \left(\frac{n}{3e}\right)^{\frac{n}{3}}) + \ln(e^{\lambda_n})$
where $\frac{1}{12n+1} < \lambda_n < \frac{5}{12*(\frac{n}{6})}$
where the $5$ comes from $(\frac{n}{2} + \frac{n}{3})/\frac{n}{6}$
Thanks!
Stirling's approximation reads $n!=u_n\mathrm e^{\lambda_n}$ with $u_n=\sqrt{2\pi n}(n/\mathrm e)^n$ and $12n\lt1/\lambda_n\lt12n+1$ hence, for every $k$ and $\ell$, $$ \log(k!)-\log(\ell!)=\log(u_k)-\log(u_\ell)+\lambda(k,\ell), $$ where $\lambda(k,\ell)=\lambda_k-\lambda_\ell$ is such that $$ \frac1{12k+1}-\frac1{12\ell}\lt\lambda(k,\ell)\lt\frac1{12k}-\frac1{12\ell+1}. $$ In particular, $$ |\lambda(k,\ell)|\lt\frac1{12\min\{k,\ell\}}. $$