Bug introduced in 9.0, persisting through 12.3.1
I was trying to evaluate the following sum.
$$ \frac{2}{m}\sum_{\substack{\text{odd }k\\1\leq k\leq m-1}} f\left(\frac{m+2+\sqrt{m^2-4k+4}}{2}\right)+f\left(\frac{m+2-\sqrt{m^2-4k+4}}{2}\right). $$
And I wrote the following Mathematica code.
2/m Sum[f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])] +
f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}]
Then I tested it with $f(x)=x^2$ and $m=60$. I defined
f[x_] = x^2
and evaluated
2/m Sum[f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])] +
f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}] /.
m -> 60 // N
which gave
(* 3664. *)
However, if I split the sum into two parts, it ends with a very different value:
2/m Sum[f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}] +
2/m Sum[f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}] /. m->60 //N
gives
(* 4.6048 + 1.12029*10^-13 I *)
What is the problem here? There seems to be no problem if $f(x)=x^p$ and $p$ is fractional. I tried $p=1.1$, $1.5$, $2.1$, etc., and both answers agree. Looks like the problem occurs when $p$ is an integer...