# Stirling's formula

Stirling's formula: $n! = (1+o(1)) (2\pi n)^{1/2} n^n e^{-n}$.

As a consequence, one has

$\binom{n}{\alpha n + k} = (c(\alpha)+o(1)) \theta(\alpha)^k 2^{h(\alpha) n} \frac{1}{\sqrt{n}}$

for fixed $0 \lt \alpha \lt 1$ and bounded k, where

$c(\alpha) := \frac{1}{\sqrt{2\pi \alpha(1-\alpha)}}$
$\theta(\alpha) := \frac{1-\alpha}{\alpha}$
$h(\alpha) := \alpha \log_2 \frac{1}{\alpha} + (1-\alpha) \log_2 \frac{1}{1-\alpha}.$

Thus for instance

$\binom{n}{n/2 + k} = (\sqrt{\frac{2}{\pi}} + o(1)) \frac{1}{\sqrt{n}} 2^n$
$\binom{n}{n/3 + k} = (\sqrt{\frac{9}{4\pi}} + o(1)) \frac{1}{\sqrt{n}} 3^n 2^{-2n/3 + k}$

etc. Note that the entropy function $h(\alpha)$ attains a maximum at $\alpha=1/2$, which is consistent with the binomials $\binom{n}{j}$ being maximized at $j \approx n/2$.

For trinomials, we have

$\frac{n!}{(\alpha n+i)! (\beta n + j)! (\gamma_n + k)!} = (c(\alpha,\beta,\gamma)+o(1)) \alpha^{-i} \beta^{-j} \gamma^{-k} 2^{h(\alpha,\beta,\gamma) n} \frac{1}{n}$

for fixed $0 \lt \alpha,\beta,\gamma \lt 1$ and bounded i,j,k summing to 1 and 0 respectively, where

$c(\alpha,\beta,\gamma) := \frac{1}{2\pi} \alpha^{-1/2} \beta^{-1/2} \gamma^{-1/2}$
$h(\alpha,\beta,\gamma):= \alpha \log_2 \frac{1}{\alpha} + \beta \log_2 \frac{1}{\beta} + \gamma \log_2 \frac{1}{\gamma}.$

Thus for instance

$\frac{n!}{(n/3+i)! (n/3+j)! (n/3+k)!} = (\frac{3^{3/2}}{2\pi} + o(1)) \frac{1}{n} 3^n.$

Here is the Wikipedia article for the Stirling's formula.