Change of signs in harmonic series Prove that if we choose signs for individual terms in harmonic series $\sum_{n=1}^{\infty}{1\over n}$ in such a way that $p$ positive terms are followed by $q$ negative terms (without rearranging the series), we get divergent series for $p \neq q$ and convergent series for $p = q$.
I think that using $ \ln n = \sum_{n=1}^{\infty}{1 \over n} - \gamma - \epsilon_n$ I should get a series in terms of logarithm involving $p$ and $q$, but I just can't find it...
 A: This is easily answered via summation by parts, e.g. using Abel's summation formula. If we let $\varepsilon_n$ be the sign we give to the term $\frac{1}{n}$, then note that
$$E(x) = \sum_{n \leqslant x} \varepsilon_n$$
remains bounded for $p = q$ - we have $0 \leqslant E(x) \leqslant p$ then - and for $p \neq q$ we have $E(x) \sim \frac{p-q}{p+q}\cdot x$ - if $k(p+q) < x \leqslant (k+1)(p+q)$, then $k(p-q) - q \leqslant E(x) \leqslant k(p-q) + p$. In both cases, we see that $b(x) := E(x) - \frac{p-q}{p+q}\cdot x$ is a bounded function on $[1,\infty)$.
Thus by Abel's formula we have
\begin{align}
\sum_{n \leqslant x} \frac{\varepsilon_n}{n} &= \frac{E(x)}{x} + \int_1^x \frac{E(t)}{t^2}\,dt \\
&= \frac{p-q}{p+q} + \frac{b(x)}{x} + \frac{p-q}{p+q}\int_1^x \frac{dt}{t} + \int_1^x \frac{b(t)}{t^2}\,dt \\
&= \frac{p-q}{p+q}\cdot\log x + \Biggl(\frac{p-q}{p+q} + \int_1^{\infty} \frac{b(t)}{t^2}\,dt\Biggr) + \frac{b(x)}{x} - \int_x^{\infty} \frac{b(t)}{t^2}\,dt \\
&= \frac{p-q}{p+q}\cdot\log x + \Biggl(\frac{p-q}{p+q} + \int_1^{\infty} \frac{b(t)}{t^2}\,dt\Biggr) + O(1/x).
\end{align}
Hence we have convergence for $p = q$ and divergence like $\frac{p-q}{p+q}\cdot \log x$ for $p\neq q$.
