Can one express in a compact form a double, triple, etc., alternating series?

Trivially, a series like$\ a_0-a_1+a_2-a_3+...$ can be written as$$\ \sum_{i=0}^\infty (-1)^ia_i.$$ But what if I want to rewrite$\ a_0+a_1-a_2-a_3+a_4+a_5-...$ ,$\ a_0+a_1+a_2-a_3-a_4-a_5+...$ and so on? I'm excluding everything similar to$\ \sum_{i=0}^\infty s(i)a_i,$ where$\ s(i)=1$ for$\ i=1+4k, 2+4k$, otherwise$\ s(i)=-1$. Is it even possible?

• I don't have time to write a full answer, but a periodic sequence like $1,1,-1,1,1,-1,\ldots$ can be constructed by taking linear combinations of third roots of unity. Oct 1 '14 at 16:21
• This is what the Discrete Fourier transform is made for Oct 1 '14 at 16:23

Let $\{c_0,\dots,c_{N-1}\}$ denote the desired periodic sequence of coefficients (so, for example, $c_0 = 1$ and $c_1 = -1$ for the $(-1)^n =e^{\pi i n} = \cos(\pi n)$ sequence). We can then write $$c_n = \frac{1}{N}\sum_{k=0}^{N-1} C_k \cdot e^{(2 \pi i kn)/N}$$ where $$C_k = \sum_{n=0}^{N-1} c_n \cdot e^{- (2 \pi i k n)/N}$$ Suppose our sequence consists of $N^+$ ones followed by $N^{-}$ zeros, an repeats in such a fashion. Defining $N = N^+ + N^-$, we have $$C_k = \sum_{n=0}^{N-1} c_n \cdot e^{- (2 \pi i k n)/N} = \sum_{n=0}^{N^+-1} e^{- (2 \pi i k n)/N} - \sum_{n=N^+}^{N} e^{- (2 \pi i k n)/N} =\\ \sum_{n=0}^{N^+-1} [e^{- (2 \pi i k)/N}]^n - e^{2 \pi i k N^+/N}\sum_{n=0}^{N^- - 1} [e^{- (2 \pi i k)/N}]^n = \\ \frac{1 - e^{2 (\pi i k N^+)/N}}{1 - e^{-(2 \pi i k)/N}} - e^{(2 \pi i k N^+)/N}\frac{1 - e^{(2 \pi i k N^-})/N}{1 - e^{-(2 \pi i k)/N}} = \\ \frac{2 - 2e^{(2 \pi i k N^+)/N}}{1 - e^{-(2 \pi i k)/N}}$$ Letting $z_N = e^{(2 \pi i)/N}$, this is simply $$C_k = 2\frac{1 - (z_N)^{kN^+}}{1 - (z_N)^k}$$ and so, all together, we have $$c_n = \frac{2}{N}\sum_{k=0}^{N-1} \left(\frac{1 - (z_N)^{kN^+}}{1 - (z_N)^k} (z_N)^{nk}\right)$$