Bug introduced in 12.1, persisting through 13.2 or later
In one of my program run on Wolfram Cloud I run the command:
Sum[(-1)^(Floor[k/2])/(k+1),{k,0,Infinity}]
and got the response
Sum: Sum does not converge
This is very strange because the series obviously converges to $\frac\pi4+\frac{\log2}2$.
I have checked that the terms are correct running:
Table[(-1)^(Floor[k/2])/(k+1),{k,0,20}]
What is the reason for the problem? I run the same code several years ago without any issue.
UPDATE:
As pointed out by Roman the reason of the problem is most probably the usage of the Floor
function. What is wrong with this?
Sum[(-1)^(Floor[k/2])/(k + 1), {k, 0, Infinity}, Regularization -> "Abel"]
$\endgroup$data = Table[{k, (-1)^(Floor[k/2])/(k + 1)}, {k, 0, 300}]; data = Table[{data[[k, 1]], Total[data[[1 ;; k]][[All, 2]]]}, {k, 1, Length@data}]; p = ListLinePlot[data]; Show[p, Plot[Pi/4 + Log[2]/2, {x, 0, Length[data]}, PlotStyle -> Red], PlotRange -> All]
screen shot !Mathematica graphics so on average it does converge, but because it never settles due to +-, it is considered not to converge? $\endgroup$Sum[(-1)^k/(k + 1), {k, 0, Infinity}
is computed fast and correct. $\endgroup$