Prove that this rearrangement is convergent and find a simple formula for the summation of it

Assume that $p$ and $q$ are natural numbers and consider another way of writing the sequence :

$1-1+\frac{1}{2}-\frac{1}{2}+\frac{1}{3}-\frac{1}{3}+\frac{1}{4}-\frac{1}{4}+\frac{1}{5}-\frac{1}{5}+ \dots$

Such that this rewriting (rearrangement) consists of $p$ positive terms and after that, $q$ negative terms.

Notice that in this rearrangement, terms with equal signs should should come like the original order they had before.

For example, if $p=3$ and $q=2$, this rearrangement is like this :

$1+\frac{1}{2}+\frac{1}{3}-1-\frac{1}{2}+\frac{1}{4}+\frac{1}{5}+\frac{1}{6}-\frac{1}{3}-\frac{1}{4}+\dots$

Prove that this rearrangement is convergent and find a simple formula for the summation of it.

Note : In the class, we learned some kind of theorem. It states that we can arrange each series in a way that it is convergent. I don't know how to apply that for this question. Also it would be good if someone wrote an explanation on how these rearrangements are good.

EDIT: General case below

Consider the series for p=2,q=1: $$1 + \frac{1}{2}-1 + \frac{1}{3} + \frac{1}{4} - \frac{1}{2} + \frac{1}{5} + \frac{1}{6}-\frac{1}{3} \ldots$$

We can write this in groups of three as $$\sum_{n=1}^\infty \frac{1}{2n-1}+\frac{1}{2n} - \frac{1}{n}$$

and simplify to $$\sum_{n=1}^\infty \frac{1}{2n-1}- \frac{1}{2n} = \sum_{n=1}^\infty (-1)^{n-1} \frac{1}{n} = \ln(2)$$

General case:

Look at the partial sum just after the n-th time through the cycle of p positive and q negative entries. Call this $A_n.$ Then we have $$A_n = H_{pn} - H_{qn}$$ where $H_n$ is the harmonic number defined by $$H_n = \sum_{k=1}^n\frac{1}{k}.$$

The harmonic number has the property $$\lim_{n\rightarrow\infty} H_n - \ln(n) = \gamma$$ where $\gamma$ is the Euler-Mascheroni Constant

So, \begin{eqnarray} \lim_{n\rightarrow\infty}A_n &=& \lim_{n\rightarrow\infty} H_{pn} - H_{qn} \\&=& \lim_{n\rightarrow\infty} \left(H_{pn} -\ln(n)\right) - \left(H_{qn} -\ln(n)\right) \\&=& \lim_{n\rightarrow\infty} \left( H_{pn} - \ln(pn) + \ln(p)\right) - \lim_{n\rightarrow\infty} \left( H_{qn} - \ln(qn) + \ln(q)\right)\\&=& (\gamma + \ln(p)) - (\gamma + \ln(q)) \\&=& \ln(p/q). \end{eqnarray}

If we call the partial sums of the whole series $B_n$ then we have $A_n = B_{n(p+q)},$ so we've proven the convergence of a subsequence of the partial sums. To establish convergence of the sequence $B_n$ to the same value as $A_n$ you can bound the deviation $|A_n - B_{(p+q)n + j}|$ for $0\leq j < p+q .$ For instance, if $p\geq q,$ the largest magnitude term in the sum in between index $(p+q)n$ and $(p+q+1)n$ has absolute value $\frac{1}{qn+1}$ so for $0\leq j < p+q,$ we have $$| A_n - B_{(p+q)n + j}|\leq \frac{p+q}{qn+1} \rightarrow 0$$ for $n\rightarrow \infty$.

The theorem you're thinking about is probably some version of Riemann's theorem on conditionally convergent series that says conditionally convergent series can be rearranged to converge to any number (including plus or minus infinity). I don't know if this is "good" so much a warning not to do any rearrangements when manipulating a sum unless it is absolutely convergent.