If in the series $1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}\cdots$ the order of the terms be altered, so that the ratio of the number of positive terms to the number of negative terms in the first $n$ terms is ultimately $a^2$, show that the sum of the series will become $\log 2a$.
It is easy to show that when $a^2=1$, the sum is just the expansion of $\log(1+x)$ when $x=1$. However I don't know how to prove it in the general case.