<s>[INST] Why is $\lim_{n \rightarrow \infty} \bigg( \bigg| \frac{n^{n^2} (n+2)^{(n+1)^2}}{(n+1)^{2n^2+2n+1}} \bigg| \bigg)=e$? I know that the following is the correct limit, but I have difficulties in seeing just why this is.
$$\lim_{n\to\infty}\left| \frac{n^{n^2} (n+2)^{(n+1)^2}}{(n+1)^{2n^2+2n+1}}\right|=e$$
 [/INST] Hint. By using the Taylor series expansion, as $x \to 0$, one has
$$
\log(1+x)=x-\frac{x}2+\frac{x^3}3+o(x^3)
$$ giving, as $n \to \infty$, 
$$
\begin{align}
-n^2\log\left(1+\frac1n\right)&=-n+\frac12-\frac1{3n}+o\left(\frac1{n}\right)
\\\\
(n+1)^2\log\left(1+\frac1{n+1}\right)&=n+\frac12+\frac1{3n}+o\left(\frac1{n}\right)
\end{align}
$$ then one may write, as $n \to \infty$, 
$$
\begin{align}
\frac{n^{n^2} (n+2)^{(n+1)^2}}{(n+1)^{2n^2+2n+1}}&=\frac{n^{n^2} (n+2)^{(n+1)^2}}{(n+1)^{n^2}(n+1)^{(n+1)^2}}
\\\\&=\left(1+\frac1n \right)^{-n^2}\left(1+\frac1{n+1} \right)^{(n+1)^2}
\\\\&=e^{-n^2\log(1+1/n)}\cdot e^{(n+1)^2\log(1+1/(n+1))}
\\\\&=e^{1/2+1/2+o(1/n)}
\\\\&=e^{1+o(1/n)}
\end{align}
$$ which yields the announced result.
</s>