# Sum of an infinite series: $1 + \frac12 - \frac13- \frac14 + \frac15 + \frac16 - \cdots$?

I've been doing a lot of stuff with infinite series and Python lately, and have been getting some very interesting results. For example, the series 1 + 1/16 - 1/256 - 1/4096 + ... (two plus signs, then two minus signs, etc.) converges to 272/257 - wow! But the series 1 + 1/16 + 1/256 + 1/4096 - ... (four alternating plus and minus signs) converges to 69904/65537 - a very interesting result indeed.

Now I want to look at a series that doesn't involve powers of two. For example, I already know that the series 1 + 1/2 + 1/3 + 1/4 + ... does not converge, but the series 1 - 1/2 + 1/3 - 1/4 + ... converges to ln(2), and that's not too hard to prove.

But what about the series 1 + 1/2 - 1/3 - 1/4 + ... ? That has two alternating plus and minus signs. When I ran 1,000,000 iterations of the sequence in Python, I obtained a result approximately equal to 1.131971. I've checked a few things, and it's not ln(3), ln(4), ln(pi), or anything else (it's about ln(3.1017), but as far as I am concerned, the number 3.1017 does not have any significance here). Can someone please help me figure this out? (I don't have any experience with calculus)

Also, I tried a series involving triangular numbers. The series 1 + 1/3 + 1/6 + 1/10 + ... does not seem to converge. What about the series 1 - 1/3 + 1/6 - 1/10 + ... ? There HAS to be some sort of special result to that one, and after 10,000,000 iterations the result stabilized around 0.77258872.

Thanks everyone!

• If you have multiple questions, you should generally make one post per question -- i.e. your question about the series for triangular numbers should probably go in another post, not this one. – Hurkyl Aug 6 '18 at 18:00
• The sum of the reciprocals of the triangular numbers does converge, to a very simple value. – saulspatz Aug 6 '18 at 18:19

## 4 Answers

If the pattern of signs is $++--$, we are looking for

$$\sum_{k\geq 0}\left(\frac{1}{4k+1}+\frac{1}{4k+2}-\frac{1}{4k+3}-\frac{1}{4k+4}\right)=\sum_{k\geq 0}\int_{0}^{1}x^{4k}(1+x-x^2-x^3)\,dx$$ or $$\int_{0}^{1}\frac{(1+x)(1-x^2)}{1-x^4}\,dx = \int_{0}^{1}\frac{1+x}{1+x^2}\,dx = \color{red}{\frac{\pi}{4}+\frac{1}{2}\log 2}.$$

About reciprocal triangular numbers, the series $\sum_{n\geq 1}\frac{2}{n(n+1)}$ does converge by the $p$-test, and it converges to $\color{red}{2}$ since $\frac{2}{n(n+1)}$ telescopes as $\frac{2}{n}-\frac{2}{n+1}$. By the same approach as before, $$\sum_{n\geq 1}\frac{2(-1)^{n+1}}{n(n+1)} = 2\sum_{n\geq 1}\int_{0}^{1}(-1)^{n-1}x^{n-1}(1-x)\,dx=2\int_{0}^{1}\frac{1-x}{1+x}\,dx$$ equals $\color{red}{4\log 2-2}$.

The given series is equal to $$\left(1-\frac13+\frac15-\frac17+\dots\right)+\frac12\left(1-\frac12+\frac13-\frac14\right)={\pi\over4}+\frac12\log2$$ as both sums are familiar.

You want $$\sum_{n=1}^\infty (-1)^{n-1} \left(\frac{1}{2n-1}+\frac{1}{2n}\right) = \sum_{n=1}^\infty (-1)^{n-1} \frac{1}{2n-1}+\sum_{n=1}^\infty (-1)^{n-1}\frac{1}{2n} \tag{\dagger}$$ (You can check breaking the sum in two is fine, as both series do converge (conditionally). Now, $$\sum_{n=1}^\infty \frac{1}{2n} = \frac{1}{2}\log 2\,.$$ For the other term, note that for $|x|< 1$, $$\sum_{n=1}^\infty (-1)^{n-1} \frac{x^{2(n-1)}}{2n-1} = \sum_{n=0}^\infty (-1)^{n} \frac{x^{2n}}{2n+1} = \frac{\arctan x}{x}$$ recognizing the power series, from which, by Abel's theorem, $$\sum_{n=1}^\infty (-1)^{n-1} \frac{1}{2n-1} = \frac{\arctan 1}{1} = \frac{\pi}{4}\,.$$ Combining the two, we get from $(\dagger)$ that $$\sum_{n=1}^\infty (-1)^{n-1} \left(\frac{1}{2n-1}+\frac{1}{2n}\right) = \boxed{\frac{1}{2}\log 2 + \frac{\pi}{4}}\,. \tag{\ddagger}$$

Period four patterns can often be studied by plugging in the fourth roots of unity; i.e. $1, i, -1, -i$. In this case, we can get everything we need from just $i$:

$$\ln(1 + i) = i + \frac{1}{2} - \frac{i}{3} - \frac{1}{4} + \ldots \\ = i \left(1 - \frac{1}{3} + \frac{1}{5} - \ldots \right) + \left(\frac{1}{2} - \frac{1}{4} + \frac{1}{6} - \ldots \right)$$

So we can use the fact that

$$\ln(1 + i) = \ln |1+i| + i \arg(1+i) = \ln \sqrt{2} + i \frac{\pi}{4}$$

to identify

$$1 - \frac{1}{3} + \frac{1}{5} - \ldots = \frac{\pi}{4}$$ $$\frac{1}{2} - \frac{1}{4} + \frac{1}{6} - \ldots = \ln \sqrt{2} = \frac{1}{2} \ln 2$$ to get $$1 + \frac{1}{2} - \frac{1}{3} - \frac{1}{4} + \ldots = \frac{\pi}{4} + \frac{1}{2} \ln 2$$