Convergence of $\sum_{n=1}^\infty \frac{(-1)^n}{n}z^{n(n+1)}$ at $z=i$. I am trying to prove that
$$\sum_{n=1}^\infty \frac{(-1)^n}{n}z^{n(n+1)}$$
converges at $z=i$, but when I evaluate at $i$ and reduce this to a series of real numbers I run in to some difficulties. It is likely that I am forgetting some results from a second semester calculus course.
Originally I showed that the series has radius of convergence $1$. I then note that for $n\in\mathbb{N}$,
\begin{align}
 (-1)^ni^{n(n+1)} &= (i^2)^ni^{n(n+1)}\\
      &= i^{n(n+3)}\\ 
      &= \begin{cases}
        1 &\mbox{if } n\equiv 0,1\bmod 4\\
        -1 &\mbox{if } n\equiv 2,3\bmod 4.
       \end{cases}.
\end{align}
I then tried to complete the claim as follows.
The series at $z=i$ is then
    \begin{align*}
  \sum_{n=1}^\infty\frac{(-1)^n}{n}i^{n(n+1)} &= \sum_{n=1}^\infty\frac{i^{n(n+3)}}{n}\\
          &= 1-\frac{1}{2}-\frac{1}{3}+\frac{1}{4}+\frac{1}{5}-\frac{1}{6}-\cdots\\
          &= \sum_{n=1}^\infty\left[\frac{(-1)^{n+1}}{2n-1}+\frac{(-1)^{n}}{2n}\right]\\
          &= \sum_{n=1}^\infty(-1)^n\left[\frac{-1}{2n-1}+\frac{1}{2n}\right]\\
          &= \sum_{n=1}^\infty(-1)^n\left[\frac{-1}{2n(2n-1)}\right],
 \end{align*}
    which converges by the alternating series test.
Now I know that in general it is a bad idea to change the order of summation of an infinite sum. Here I do not believe I have changed the order by considering successive pairs of terms, but my classmate reminded me that this is not always fine. For example, the series $\sum_{n=1}^\infty (-1)^n$ diverges, but if we sum over consecutive pairs we may "show" that the sum converges to $0$, which is nonsense.
What I would like to ask is:
(1) Is my method correct, and if so what justification may I need? And,
(2) If my method is incorrect, how might I improve this? And,
(3) What would I generally need to manipulate an infinite sum in this way, if it is ever allowable?
 A: I can see that you could do this more simple. So, i on n(n+1) = (-1)^(n(n+1)/2), and this n(n+1)/2 is divisible by 2. So, we have that (-1)^n*i^(n(n+1)) = (-1)^(n(n+3)/2), so, if n = 0(mod 4) this is 1, if n = 1(mod 4) this is 1, if n = 2(mod 4) this is -1 and if n = 3(mod 4) this is -1. So, we have sum of those, 1/4*k + 1/(4*k+1) - 1/(4*k+2)-1/(4*k+3), so two convergent sums 1/(4*k)-1/(4*k+2) = 2/(4*k*(4*(k+2))) (same convergency with 1/k^2, and this converges) and 1/(4*k+1)-1/(4*k+3) = 2/(4*(k+3)4(k+1)) which has same convergency as 1/k^2, so this converges. Our sum is the some of the two, so it converges.
A: User Chen Wang has said that if I group consecutive terms of the same sign then there will not be an issue. If this is the case then
\begin{align*}
  \sum_{n=1}^\infty\frac{(-1)^n}{n}i^{n(n+1)}
            &= \sum_{n=1}^\infty\frac{i^{n(n+3)}}{n}\\
   &= 1-\frac{1}{2}-\frac{1}{3}+\frac{1}{4}+\frac{1}{5}-\frac{1}{6}-\cdots\\
   &= 1+ \sum_{n=1}^\infty(-1)^n\left[\frac{1}{2n}+\frac{1}{2n+1}\right]\\
   &= 1+ \sum_{n=1}^\infty(-1)^n\left[\frac{4n+1}{2n(2n+1)}\right],
\end{align*}
where the sum on the right converges by the alternating series test.
A: What you do is legal.
Given any rearrangement of natural numbers, $\pi: \mathbb{N} \to \mathbb{N}$, we will call it
a bounded rearrangement if we can find a $M > 0$ such that for all $k$, $|\pi(k) - k| \le M$.
Given any null sequence $(a_k)$, i.e a sequence with $\lim_{k\to\infty} a_k = 0$.
If the series $\sum_{k=0}^\infty a_k$ converges to some limit $a$ or diverges, so does every bounded rearrangement of it. i.e.
$$\sum_{k=0}^\infty a_k = \sum_{k=0}^\infty a_{\pi(k)}$$
Update
To prove this, let $\epsilon$ be any positive number.
Since $(a_k)$ is a null sequence, we can find a $N$ such that $|a_k| < \frac{\epsilon}{2M}$ whenever $k \ge N$.
For any $n \ge N + M$, let us compare the two partial sums:
$$\sum_{k=0}^n a_k \quad\text{vs.}\quad \sum_{k=0}^n a_{\pi(k)}$$
Notice
$$|\pi(k) - k| \le M, \forall k \quad\implies\quad |\pi^{-1}(k) - k| \le M, \forall k$$
Every term $a_k$ with $k \le n-M$ appear in both sides of the partial sums.
Since the partial sums in the right only involves $a_k$ with $k \le n+M$, this leads to:
$$\left|\sum_{k=0}^n a_k - \sum_{k=0}^n a_{\pi(k)}\right| \le \sum_{k=n-M+1}^{n+M} |a_k| \le 2M\frac{\epsilon}{2M} = \epsilon$$
i.e. the difference of the two partial sums is a null sequence, so the two series converges/diverges at the same time.
As you pointed out, above didn't cover your case exactly because you are regrouping
instead of rearranging terms. However, regrouping also works as long as 


*

*The underlying sequence is a null sequence

*The number of terms that grouped stayed bounded. 


Just think in terms of the partial sums. Like the case of "bounded rearrangement", the difference between the partial sums and its transformed copy is bounded by a multiple of the underlying null sequence. As a result, the difference of partial sums is a null sequence. The convergence/divergence of your series is invariant under this sort of regrouping. 
In fact, you can mix regrouping/rearrangement as you please. As long as both of them are "bounded", everything just works!
