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 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}$.