nagatomo
(NAKAMURA Nagatomo)
1
The following sum was calculated.
In[1]:= Sum[(1 - k/(n + 2))^(1/n), {k, 1, n}] // Simplify
Out[1]= (-(1/(2 + n)))^(1/n) (-HurwitzZeta[-(1/n), -1] + HurwitzZeta[-(1/n), -1 - n])
and,
In[2]:= % /. n -> 100.
Out[2]= 98.8711 + 6.22044 I
But,
In[3]:= n = 100.; Sum[(1 - k/(n + 2))^(1/n), {k, 1, n}]
Out[4]= 99.0666
What’s happend?
n >= k, and n and k are integers.
Is it necessary to put a condition in the former sum?
It looks like a bug. The correct value for the sum seems to be the absolute value of the formula given by Mathematica:
s[n_] = Abs[Sum[(1 - k/(n + 2))^(1/n), {k, 1, n}]];
Table[Abs[s[n] - Sum[(1 - k/(n + 2))^(1/n), {k, 1, n}]], {n, 1,
100}] // N // Chop
Perhaps Mathematica chooses the wrong value for multi-valued functions, such as the root of a negative number (-1/(2+n))^(1/n).
nagatomo
(NAKAMURA Nagatomo)
3
Thank you for your reply.
Is it a bug…
I want to know the general term mathematically, but HurwitzZeta[] is wrong.