Bug introduced in 10.4.1 or earlier and fixed in 11.0.0
I claim that the series $\sum_{n=2}^{\infty}\frac{(-1)^n}{\sqrt{n}+(-1)^n}$ diverges. To see this, rewrite the $n^{th}$ term as follows: \begin{equation*} \frac{(-1)^n}{\sqrt{n}+(-1)^n} = \frac{(-1)^n}{\sqrt{n}+(-1)^n} \times \frac{\sqrt{n}+(-1)^{n+1}}{\sqrt{n}+(-1)^{n+1}} \end{equation*} \begin{equation*} = \frac{(-1)^n\sqrt{n}+(-1)^{2n+1}}{n+(-1)^{2n+1}} = \frac{(-1)^n\sqrt{n}}{n-1} + \frac{-1}{n-1} \end{equation*} Thus, \begin{equation*} \sum_{n=2}^{\infty}\frac{(-1)^n}{\sqrt{n}+(-1)^n} = \sum_{n=2}^{\infty}\frac{(-1)^n\sqrt{n}}{n-1} - \sum_{n=1}^{\infty}\frac{1}{n} \end{equation*} Now, we have the difference of two series. The first series, by the Alternating Series Test, is convergent, and the second is the well known divergent harmonic series.
However,
SumConvergence[((-1)^n)/(Sqrt[n] + (-1)^n), n]
returns True, and
N[Sum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, Infinity}]]
returns -2.70244.
To add some evidence for the divergence of the series, the code
pow10 = 10;
expo = 1;
While[ expo <= 6,
Print [N[Sum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, pow10}]]];
expo++;
pow10 *= 10;
]
returns
-1.74377
-4.21214
-6.55378
-8.86764
-11.1737
-13.4774
I see in another post that there was an issue with SumConvergence in version 10.0.0.0, but I am using Version 10.2. Any insights here?
NSum
using the AlternatingSigns method yields a slightly different result as the one above forSum
:NSum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, Infinity}, Method -> "AlternatingSigns"]
==> -2.67892.Sum
with a finite limit yields the same set of results as your loop does. $\endgroup$a[2n]+a[2n+1]
to be negative for all naturaln
, the partial sums very quickly get below -2.67892, and the positive element of the pair of two neighboring elements is never sufficient to bring it even close to the supposed limit. $\endgroup$