Is there an algorithm to determine whether a series converges? I thought of this question in connection with Calculus II (a course in the US which includes, among other things, techniques of integration and convergence tests for series, both of which are taught as a bunch of techniques that might work for a particular problem) but feel free to make the answers as complicated as necessary. The question of whether an elementary antiderivative of an elementary function $f(x)$ exists is answered by the Risch algorithm and I want to ask a similar question about convergence of series.
Let $f(x)$ be an elementary function and $a_n=f(n)$ for $n=0,1,2,\ldots$. Is there an algorithm that will tell us if $\sum_{n=0}^\infty a_n$ converges? Are there examples that are undecidable?
The integral test might help convert a solution in one problem to the other but I don't see that it solves the problem entirely.
 A: If such an algorithm would exist at the moment then we will know whether the series 
$$
\sum\limits_{n=1}^\infty\frac{1}{n^3\sin^2 n}
$$
converges. But it is not, for details see this answer.
A: There are multiple algorithms, but let's use one that might interest you -- the ratio test.
The ratio test doesn't require using your series to determine convergence -- it depends on one limit. Let's let $f(n)$ be an "arbitrary" function and let $a_n = f(n) \ \forall  \ \mathbb N$ (which was already defined in the question you asked, so I am sorry for duplicating that). The ratio test states that $\forall \ n, n \neq 0$, the following rules apply (recited from another website I credit):
Let's define $L$ to be: $$\lim_{n \to \infty} |\frac {a_{n + 1}}{a_n}|$$ If $L < 1$, then the series converges. If $L > 1$, then the series diverges. If $L = 1$, the test is inconclusive (which partly answers your second question).
The ratio test is undecidable for $L = 1$ (as I already stated). The root test also is undecidable for $L = 1$, but $L$ is equal to: $$\lim_{n \to \infty} |a_n|^{\frac 1n}$$ Hopefully this may help you.
References:


*

*Series Convergence Tests
