An asymptotic estimate for $\binom{n}{k}$ when $n$ is much larger than $k$ According to Wikipedia, if $n,k \to \infty$ and $k / n \to 0$, then
$$\binom{n}{k} \approx \left( \frac{en}{k} \right)^k \cdot (2 \pi k)^{-1/2} \cdot \exp \left( -\frac{k^2}{2n} (1+o(1)) \right).$$
Stirling's approximation gives that
$$\binom{n}{k} \approx \frac{ \sqrt{2 \pi n } (n/e)^n}{\sqrt{2 \pi k} (k/e)^k \sqrt{2 \pi (n-k)}((n-k)/e)^{n-k} } \approx \frac{n^n}{\sqrt{2 \pi k} \cdot k^k \cdot (n-k)^{n-k}},$$
since $k/n \to 0$, but I still don't see how to get from here to there. In particular, I don't see where the smaller order term  $$\exp \left( -\frac{k^2}{2n} (1+o(1)) \right)$$
comes from.
 A: We have
$$
\frac{{n^n }}{{\sqrt {2\pi k} k^k (n - k)^{n - k} }} = \left( {\frac{{en}}{k}} \right)^k (2\pi k)^{ - 1/2} \left( {1 - \frac{k}{n}} \right)^{k - n} e^{ - k} .
$$
Now
\begin{align*}
\left( {1 - \frac{k}{n}} \right)^{k - n} e^{ - k} & = \exp \left( {(k - n)\log \left( {1 - \frac{k}{n}} \right) - k} \right)
\\ &
 = \exp \left( {(k - n)\left( { - \frac{k}{n} - \frac{{k^2 }}{{2n^2 }} + \mathcal{O}\!\left( {\frac{{k^3 }}{{n^3 }}} \right)} \right) - k} \right)
\\ &
 = \exp \left( { - \frac{{k^2 }}{{2n}} - \frac{{k^3 }}{{2n^2 }} + \mathcal{O}\!\left( {\frac{{k^4 }}{{n^3 }}} \right) + \mathcal{O}\!\left( {\frac{{k^3 }}{{n^3 }}} \right)} \right)
\\ &
 = \exp \left( { - \frac{{k^2 }}{{2n}}\left( {1 + \frac{k}{n} + \mathcal{O}\!\left( {\frac{{k^3 }}{{n^2 }}} \right)} \right)} \right)
\\ &
 = \exp \left( { - \frac{{k^2 }}{{2n}}\left( {1 + o(1)} \right)} \right),
\end{align*}
provided $k = o(n^{2/3} )$.
Addendum. We can derive the approximation under the weaker assumption $k=o(n)$ as follows. We write
$$
\binom{n}{k} = \frac{{n^k }}{{k!}}\prod\limits_{m = 1}^{k - 1} {\left( {1 - \frac{m}{n}} \right)}  \sim \left( {\frac{{en}}{k}} \right)^k (2\pi k)^{ - 1/2} \prod\limits_{m = 1}^{k - 1} {\left( {1 - \frac{m}{n}} \right)} 
$$
for large $n$ and $k$. Then
\begin{align*}
\prod\limits_{m = 1}^{k - 1} {\left( {1 - \frac{m}{n}} \right)} & = \exp \left( {\sum\limits_{m = 1}^{k - 1} {\log \left( {1 - \frac{m}{n}} \right)} } \right) = \exp \left( {\sum\limits_{m = 1}^{k - 1} {\left( { - \frac{m}{n} + \mathcal{O}\!\left( {\frac{{m^2 }}{{n^2 }}} \right)} \right)} } \right)
\\ & = \exp \left( { - \frac{1}{n}\sum\limits_{m = 1}^{k - 1} m  + \mathcal{O}\!\left( {\frac{1}{{n^2 }}} \right)\sum\limits_{m = 1}^{k - 1} {m^2 } } \right) = \exp \left( { - \frac{{k^2 }}{{2n}} + o(1) + \mathcal{O}\!\left( {\frac{{k^3 }}{{n^2 }}} \right)} \right)
\\ & = \exp \left( { - \frac{{k^2 }}{{2n}}\left( {1 + \mathcal{O}\!\left( {\frac{k}{n}} \right)} \right)} \right) = \exp \left( { - \frac{{k^2 }}{{2n}}(1 + o(1))} \right),
\end{align*}
provided $k=o(n)$.
A: If $n\gg k\gg0$, that is, $\frac1k,\frac kn\to0$, then
$$
\begin{align}
\log\left(\frac{n!}{(n-k)!}\right)
&=\sum_{j=1}^k\log(n-j+1)\tag{1a}\\
&=k\log(n)+\sum_{j=1}^k\log\left(1-\frac{j-1}n\right)\tag{1b}\\
&=k\log(n)-\frac{k^2-k}{2n}+O\!\left(\frac{k^3}{n^2}\right)\tag{1c}\\[3pt]
&=k\log(n)-\frac{k^2}{2n}\left(1+O\left(\frac1k+\frac kn\right)\right)\tag{1d}
\end{align}
$$
Explanation:
$\text{(1a)}$: write a log of a product as a sum of logs
$\text{(1b)}$: pull out a $\log(n)$ out of each term of the sum
$\text{(1c)}$: $\log(1+x)=x+O\!\left(x^2\right)$
$\text{(1d)}$: factor out the errors
Therefore,
$$
\begin{align}
\binom{n}{k}
&=\frac1{k!}n^ke^{-\frac{k^2}{2n}\left(1+O\left(\frac1k+\frac kn\right)\right)}\tag{2a}\\
&=\frac1{\sqrt{2\pi k}}\frac{e^k}{k^k}n^ke^{-\frac{k^2}{2n}\left(1+O\left(\frac1k+\frac kn\right)\right)+O\left(\frac1k\right)}\tag{2b}\\
&=\frac1{\sqrt{2\pi k}}\left(\frac{en}k\right)^ke^{-\frac{k^2}{2n}\left(1+O\left(\frac1k+\frac kn+\frac n{k^3}\right)\right)}\tag{2c}
\end{align}
$$
Explanation:
$\text{(2a)}$: apply $(1)$
$\text{(2b)}$: Stirling's Approximation
$\text{(2c)}$: incorporate the $O\!\left(\frac1k\right)$ error from Stirling

By assumption, $\frac1k,\frac kn\to0$. However, if we don't have $\frac n{k^3}\to0$, then, as shown in $\text{(2c)}$, the error from Stirling's approximation for $k!$ affects the $e^{-\frac{k^2}{2n}}$ factor. For example, if
$$
\binom{n}{k}\sim\frac1{\sqrt{2\pi k}}\left(\frac{en}k\right)^ke^{-\frac{k^2}{2n}}\tag3
$$
and we define
$$
f(n,k)=\frac{n}{k^2}\log\left(\binom{n}{k}\sqrt{2\pi k}\left(\frac{k}{en}\right)^k\right)\tag4
$$
then $f(n,k)$ is the coefficient of $\frac{k^2}n$ in the exponential, so we would expect
$$
\lim_{\substack{1/k\to0\\k/n\to0}}f(n,k)=-\frac12\tag5
$$
However, if $\frac n{k^3}$ does not tend to $0$, $f(n,k)$ may not tend to $-\frac12$:

