# The proper way to write the input for a certain series

Mathematica tells the series below doesn't converge. I think it converges. What would the proper way to write things be as an input?

Sum[((-1)^(n) Log[1 + 2 n])/(1 + 2 n), {n, 0, Infinity}]

-
By the alternating series test it's clear the series converges, but it seems the convergence is very slow. –  Chris's sis the artist Apr 25 '13 at 18:54
What version of Mathematica are you using? It doesn't tell me that it does not converge. It simply can't calculate it. v9.0.1 here. –  Szabolcs Apr 25 '13 at 18:57
@Szabolcs I use v8.0 here. –  Chris's sis the artist Apr 25 '13 at 18:58
Yes, I can reproduce that in v8. It seems it was a bug in v9, 'fixed' in a certain way in v9. No answer is better than a wrong answer. –  Szabolcs Apr 25 '13 at 18:59
@belisarius We've been talking to ourself for days now... –  Daniel Lichtblau Apr 25 '13 at 21:38

You can sum your infinite series by shifting the sum over n along by 1/2, which then simplifies the summand to a form that Mathematica can handle.

(1/(-1)^(1/2)) Sum[((-1)^n Log[2 n])/(2 n), {n, 1/2, Infinity, 1}]

(* (1/4) (Pi Log[4] + StieltjesGamma[1, 1/4] - StieltjesGamma[1, 3/4]) *)


The overall factor 1/(-1)^(1/2) cancels the (-1)^(1/2) factor that is introduced by shifting the sum in this way.

Numerically this evaluates to -0.192901, as expected.

-

To get an actual answer in this case, you could simply retreat to the numerical evaluation of this sum. It works by simply changing Sum to NSum in your code:

NSum[((-1)^(n) Log[1 + 2 n])/(1 + 2 n), {n, 0, Infinity}]

(* ==> -0.192901 *)

-