Why does Wolfram Alpha give $\sum_{n=1}^{\infty}(e^i)^{n^2}\approx9.92988+1.76807i$

complex numberssequences-and-serieswolfram alpha

When I input
$$\sum_{n=1}^{\infty}(e^i)^{n^2}$$
in Wolfram Alpha, it gives me the result,
$$\sum_{n=1}^{\infty}(e^i)^{n^2}\approx9.92988+1.76807i$$
I think this is wrong, but I do not understand why Wolfram Alpha does that. Any suggestions why this happens? Here is a screen shot:
enter image description here

Best Answer

This is interesting. The answer is clearly wrong: the real part of the result is $\sum\limits_{n=1}^{\infty} \cos(n^2)$ and the imaginary part is $\sum\limits_{n=1}^{\infty} \sin(n^2)$. It is quite clear that both of these sums are divergent: the sequences $\cos(n^2)$ and $\sin(n^2)$ are not even null-sequences. Interestingly, wolfram realizes this: try $\sum\limits_{n=1}^{\infty} \cos(n^2)$, for example.

Related Question