I know that a series in the form
$$\sum_{n=1}^\infty\frac1{n^p} \tag 1$$
converges if $p>1$. But suppose I had a series in this form:
$$\sum_{n=1}^\infty\frac1{n^{p(n)}} \tag 2$$
where $p(n)$ is a function which is strictly greater than $1$ for each $n$ (but whose infimum might be $1$). Does the series still converge? Can I apply $(1)$ in this situation? An example of series of this kind may be
$$\sum_{n=1}^\infty\frac1{n^{2-\sin n}} \tag 3$$
How do you prove the convergence of $(3)$?