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.


    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}]]];
      pow10 *= 10;



I see in another post that there was an issue with SumConvergence in version, but I am using Version 10.2. Any insights here?

  • 1
    $\begingroup$ I believe you are right. I note that NSum using the AlternatingSigns method yields a slightly different result as the one above for Sum: 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$ Mar 17, 2016 at 20:20
  • 2
    $\begingroup$ But if a sum is conditionally convergent (which if that sum converges, it will be conditionally convergent), if you rearrange the sum, you can get a different value for the limit (and you can rearrange it to get infinity), so rearranging it and getting infinity is not evidence for that sum not converging. $\endgroup$
    – march
    Mar 17, 2016 at 20:39
  • $\begingroup$ In fact, maybe I'm thinking about this wrong, but doesn't this sum also converge by the Alternating Series Test? Maybe it's the decreasing monotonically part that's missing... $\endgroup$
    – march
    Mar 18, 2016 at 6:49
  • 1
    $\begingroup$ @march It is missing that. Without rearranging, but just grouping the elements of the series pairwise we find a[2n]+a[2n+1] to be negative for all natural n, 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$
    – LLlAMnYP
    Mar 18, 2016 at 9:16
  • 2
    $\begingroup$ It now returns unevaluated in MMA 11.0.0. $\endgroup$
    – user58955
    Aug 13, 2016 at 2:45

2 Answers 2


Another way to rewrite the series:

Sum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, 1001}] ==
 Sum[1/(Sqrt[2 n] + 1) - 1/(Sqrt[2 n + 1] - 1), {n, 1, 500}]
SumConvergence[((-1)^n)/(Sqrt[n] + (-1)^n), n]
SumConvergence[1/(Sqrt[2 n] + 1) - 1/(Sqrt[2 n + 1] - 1), n]

( v 10.1 )

This is not rearranging terms, but grouping in pairs; the series are the same:

enter image description here

  • $\begingroup$ So, I assume you conclude that we see a bug here? $\endgroup$ Mar 17, 2016 at 20:56
  • 2
    $\begingroup$ Rearranging terms is a big no-no for infinite sums though. Like @march said, the series might be conditionally convergent, although the OP is rather convincing. $\endgroup$
    – LLlAMnYP
    Mar 17, 2016 at 21:04
  • $\begingroup$ beyond my expertise to prove or disprove (at least in a few minutes). I concur the OP's argument looks convincing. $\endgroup$
    – george2079
    Mar 17, 2016 at 21:20
  • 2
    $\begingroup$ @Sjoerd C. de Vries I would conclude that there is a bug here. By the way, this is a problem from Tom Apostol's excellent, but nowadays out of favor (due to it's rigor) "Calculus, 2e". The answer for the problem is "divergent." $\endgroup$
    – clburchard
    Mar 18, 2016 at 13:17
  • 1
    $\begingroup$ Let the partial sum be p[n_]:= Sum[1/( 1 + (-1)^k Sqrt[k]), {k,2,n}]. Then we find numerically that Sqrt[ Log[n] ] > | p[n] | > Log[n] from n>n0 where n0 is some value about 20 or so. So the series is divergent. $\endgroup$ Mar 20, 2016 at 16:07

Wow. Just wow. So slightly different $\sum_{n=2}^{\infty} \dfrac{(-1)^n}{n+(-1)^n}$ is a classic example of (conditionally) convergent series for which Leibniz test fails. Leibniz test's monotonicity is NOT a necessary condition, thus the test itself is only sufficient, but not necessary! This is a very important result, because the test includes main nessessary condition for all series!

As for your variant of this series... It is also an example. See (diverges by Tailor): https://math.stackexchange.com/a/4221590 It is actually a bad idea to use something like this (but it is correct, sum of divergent and convergent series is always divergent) since if it is conditionally convergent you can always rearrange the terms to make it divergent (Riemann theorem) and thus sometimes vice versa is possible. So... Use Tailor instead and it is divergent, yes: https://math.stackexchange.com/a/2423137

There are other examples of such series with now absolute convergence. https://math.stackexchange.com/a/1073294/756502

I am not surprised Mathematica fails with these. They should really be remembered. Even this fails, but on Alpha it works:

a[n_] := ((-1)^n)/(n + (-1)^n);
SumConvergence[a[n], n]

Also see: https://math.stackexchange.com/a/1858185/756502


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.