Consider the following series $$\sum_{n \geq 1} \sin \left(\frac{n^2+n+1}{n+1} \pi\right)$$
The general term of the series does not go to zero, in fact $$\nexists\lim_{n \to \infty} \sin \left(\frac{n^2+n+1}{n+1} \pi\right) $$
Nevertheless on textbook I find that $$\sum_{n \geq 1} \sin \left(\frac{n^2+n+1}{n+1} \pi\right) = \sum_{n \geq 1} (-1)^n \sin \left(\frac{\pi}{n+1} \right)$$ Which converges conditionally.
I understand how to get the last series and why it converges conditionally, but I always thought that a necessary condition for any convergence of a series is that the limit of the general term is zero.
Am I missing something?
Note that $$\frac{n^2+n+1}{n+1}=n+\frac{1}{n+1}$$
Therefore, we can write
$$\sin\left(\frac{n^2+n+1}{n+1}\,\pi\right)=\sin\left(n\pi +\frac{\pi}{n+1}\right)=(-1)^n\sin\left(\frac{\pi}{n+1}\right)$$
Certainly, we have $\lim_{n\to \infty}(-1)^n\sin\left(\frac{\pi}{n+1}\right)=0$ and hence $\lim_{n\to \infty}\sin\left(\frac{n^2+n+1}{n+1}\,\pi\right)=0$ also.
So, the general terms of the series do approach $0$. And in fact, by Leibniz's test for alternating series, we assert that
$$\sum_{n=1}^\infty \sin\left(\frac{n^2+n+1}{n+1}\,\pi\right)=\sum_{n=1}^\infty (-1)^n\sin\left(\frac{\pi}{n+1}\right)$$
converges.