How would one show the following limit?
$$\lim_{n \to \infty}\frac{\left(1+\frac{1}{n}\right)^{n^2}}{e^n} = e^{-1/2}$$
Rewriting this as $\left(\frac{\left(1+\frac{1}{n}\right)^{n}}{e}\right)^n$, I expected the limit to be $1$, but I see that I have erroneously assumed that $f(n) \to 1$ implies $(f(n))^n \to 1$.
Using Taylor-MacLaurin at order $2$, rewrite is as $$\mathrm e^{n^2\ln(1+\tfrac1n)-n}=\mathrm e^{n^2\bigl(\tfrac1n-\tfrac1{2n^2}+o\bigl(\tfrac1{n^2}\bigr)\bigr)-n}=\mathrm e^{-\tfrac12+o(1)}\to\mathrm e^{-\tfrac12}.$$