The limit of sequence $\sqrt{2\pi n}\,e^{-n}\frac{n^k}{k!}$ 
The question is from this exercise. I figured out two solutions that lead to different answers and I don't know why the wrong answer is wrong.
The condition is $\lim_{n \rightarrow \infty} \frac{k - n}{\sqrt{n}} = x$.
and we can use Stirling's formula: $n! \sim \sqrt{2\pi n}\,e^{-n}n^n$
solution 1
$$\sqrt{2\pi n}\,e^{-n}\frac{n^k}{k!} = \frac{n! n^{k - n}}{k!} = \prod_{i = 1}^{k - n}\frac{n}{n + i}  = (\prod_{i = 1}^{k - n}\frac{n + i}{n})^{-1} = (\prod_{i = 1}^{k - n}(1 +\frac{i}{n}))^{-1} \\= e^{-\sum_{i = 1}^{k - n}\frac{i}{n}} = e^{\frac{(k - n)^2 +(k - n)}{- 2n}} \rightarrow e^{-\frac{x^2}{2}}$$
solution 2
$$\sqrt{2\pi n}\,e^{-n}\frac{n^k}{k!} \sim \sqrt{2\pi n}\,e^{-n} n^k \frac{e^k}{\sqrt{2\pi k}\,k^k} = (\frac{n}{k})^{k + \frac{1}{2}} e^{k - n} = (1 + \frac{k - n}{n})^{-(k + \frac{1}{2})} e^{k - n} \\= e^{\frac{(k - n)(k + \frac{1}{2})}{-n}}e^{k - n} = e^{\frac{-(k - n)^2}{n}-\frac{k-n}{2n}} \rightarrow e^{-x^2}$$
I wonder why the solution 2 is wrong. Thank you.
 A: The first step is correct, since it just depends on $k$ being large and doesn't care about how big it is relative to $n$.
The second step is just algebra, so that's fine.
The third step is also just algebra, so that's fine.
The fourth step is, rigorously speaking, very wrong, since it would only even have a hope of being true in the limit. But I assume you meant to take limits at that stage, so I do understand what you were basically trying to do. But it is still not right.
A way to do it right is to exactly recognize the $(1+\dots)^{\dots}$ as an exponential: $\left ( 1 + \frac{k-n}{n} \right )^{-(k+1/2)} e^{k-n} = \exp \left ( -(k+1/2) \ln \left ( 1 + \frac{k-n}{n} \right ) + k-n\right )$.
Now you need to find the limit of the exponent, which means you need to find
$$\lim_{n \to \infty} -\left ( n+\sqrt{n} x + 1/2 \right ) \ln \left ( 1 + \frac{x}{\sqrt{n}} \right ) + \sqrt{n} x$$
after replacing $k$ with what it is asympotically equivalent to. You can see from here that correctly evaluating this limit requires estimating the logarithm the logarithm has to be estimated with $o(n^{-1})$ error. This requires retaining the quadratic term in the Taylor expansion of $\ln(1+y)$ at $y=0$.
A similar calculation appears in Why is the birthday problem not so surprising?
A: Hint.   This step is incorrect:
$$
(1 + \frac{k - n}{n})^{-(k + \frac{1}{2})} e^{k - n} = e^{\frac{(k - n)(k + \frac{1}{2})}{-n}}e^{k - n}
$$
In fact, assuming $\lim_{n \rightarrow \infty} \frac{k - n}{\sqrt{n}} = x$, even this is incorrect:
$$
\lim_{n\to\infty}\left[ (1 + \frac{k - n}{n})^{-(k + \frac{1}{2})} e^{k - n}\right] = \lim_{n\to\infty}\left[ e^{\frac{(k - n)(k + \frac{1}{2})}{-n}}e^{k - n}\right] .
$$
