# Are there certain conditions that $a_n$ must meet in order for this series to converge?

Suppose we have an alternating series of the form $$\sum_{n=1}^\infty \frac{(-1)^{a_n}}{n}$$ We know this converges for some basic cases, like when $a_n=n$ (the sum evaluating to $-\ln2$) or for interesting alternating patterns like $$\sum_{n=1}^\infty \frac{(-1)^{\lfloor\frac{n}{2}\rfloor}}{n}=1+\frac{1}{2}-\frac{1}{3}-\frac{1}{4}+\cdots=\frac{\pi}{4}-\frac{\ln2}{2}$$ I also recall seeing a question on here about an alternation resembling a factorial pattern, something like $$1-\underbrace{\left(\frac{1}{2}+\frac{1}{3}\right)}_{2!\text{ terms}}+\underbrace{\left(\frac{1}{4}+\frac{1}{5}+\frac{1}{6}+\frac{1}{7}+\frac{1}{8}+\frac{1}{9}\right)}_{3!\text{ terms}}-\cdots$$ which may or may not have converged, I cannot seem to find it...

Is there a generalization that can be made about the conditions on $a_n$ for these types of series?

• I suspect a general resolution of this is a Hard Problem™. – Chappers Sep 25 '15 at 21:33
• @JoseArnaldoBebitaDris No. The limit above is $1$ for any real $a_n$. – Winther Sep 25 '15 at 22:16
• If the density of the set $\{n\colon a_n \text{ is even} \}$ exists, it must equal $\frac12$ for the series to converge. (But there are lots of sequences where that density doesn't even exist....) Even the density equaling $\frac12$ isn't sufficient, though: take $a_n=n$ for all $n$ except those of the form $2\lfloor k\log k\rfloor$ for some $k$, in which case take $a_n=-1$. Here the density equals $\frac12$ but the series diverges to $-\infty$. – Greg Martin Sep 25 '15 at 22:23

But the series does converge for "most" choices! If $(\epsilon_n)$ is a sequence of plus or minus ones chosen "at random" then the series $\sum \epsilon_n/n$ converges almost surely.
• I realize I made the "mistake" of over-generalizing. I have a specific set of cases I'm thinking about for $a_n$, but I'd like to think about it some more before I post another question on the topic. – user170231 Oct 10 '15 at 0:58