# Can a convergent sum using only integers produce a complex result?

We use this function to define the boundaries for the product in the denominator:

$$f(\text{n\_})\text{:=}\frac{1}{8} \left(2 n (n+2)-(-1)^n+1\right)$$

We calculate the infinite sum:

$$\sum _{n=1}^{\infty } \frac{1}{(f(n)+1)_{f(n+1)-f(n)}}$$

We get this complex number:

$$0.61944\, -\text{5.565802539025895\grave{ }*{}^{\wedge}-19} i$$

Is this a reasonable result?

Note: The calculation takes a very long time in Mathematica, so if this is not reasonable, it's time to perform some debugging.

-
$−5.565802539025895\cdot 10^{-19}i$ points to an accuracy error. –  draks ... Jul 10 '12 at 22:08
Yes, that would seem to be roundoff-error. You know of the function Chop[], I presume? –  Guess who it is. Jul 10 '12 at 23:05

no, it's not reasonable to get a complex number, when the members of sum are real. We can conclude this, by discussing imaginary parts of both sides.

-
Not reasonable mathematically. From the computational point of view, it is reasonable that machine-precision calculations with real numbers may sometimes produce results with a nonzero (but very small) imaginary part. –  user31373 Jul 10 '12 at 22:24