<s>[INST] $\lim_{n\rightarrow \infty } (\frac{(n+1)^{2n^2+2n+1}}{(n+2)^{(n+1)^2}\cdot n^{n^2}})$ The given question is asking me to test the series for convergence or divergence.
$$\sum_{n=1}^{\infty } (\frac{n}{n+1})^{n^2}$$
My attempt, I'm using ratio test and I'm stuck at the limits part.
I don't know how to evaluate $\lim_{n\rightarrow \infty } (\frac{(n+1)^{2n^2+2n+1}}{(n+2)^{(n+1)^2}\cdot n^{n^2}})$
The answer given which is $\frac{1}{e}<1$, so it converges. Hope someone can provide the solution for the limit part, Thanks in advance.
 [/INST] If you want to deal with the limit you posted, consider $$u_n= \left(\frac{n}{n+1}\right)^{n^2}\implies \log(u_n)=n^2 \log\left(\frac{n}{n+1}\right)=n^2 \log\left(1-\frac{1}{n+1}\right)$$ Now, use Taylor expansion and get $$\log(u_n)=-n+\frac{1}{2}-\frac{1}{3 n}+\frac{1}{4
   n^2}+O\left(\frac{1}{n^3}\right)$$ Similarly $$u_{n+1}= \left(\frac{n+1}{n+2}\right)^{(n+1)^2}\implies \log(u_{n+1})=n^2 \left(1+\frac 1n\right)^2\log\left(1-\frac{1}{n+2}\right)$$ and Taylor again to get $$\log(u_{n+1})=-n-\frac{1}{2}-\frac{1}{3 n}+\frac{7}{12
   n^2}+O\left(\frac{1}{n^3}\right)$$ Combining the above $$\log(u_{n+1})-\log(u_{n})=\log \left(\frac{u_{n+1}}{u_n}\right)=-1+\frac{1}{3 n^2}+O\left(\frac{1}{n^3}\right)$$ Taylor again $$\frac{u_{n+1}}{u_n}=\exp\left({\log \left(\frac{u_{n+1}}{u_n}\right) }\right)=\frac{1}{e}+\frac{1}{3 e n^2}+O\left(\frac{1}{n^3}\right)$$
Edit
Making the problem more general with $$v_n= \left(\frac{n}{n+a}\right)^{(n+b)^2}$$ and using the same steps, we should find $$\frac{v_{n+1}}{v_n}=e^{-a}+\frac{a e^{-a} \left(a^2-3 a b+3 b^2\right)}{3
   n^2}+O\left(\frac{1}{n^3}\right)$$
</s>