Message Boards Message Boards

0
|
2670 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

The sum of the sequences does not match

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?

2 Replies

Thank you for your reply.

Is it a bug...
I want to know the general term mathematically, but HurwitzZeta[] is wrong.

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).

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract