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?