Is this a valid way to prove this modified harmonic series diverges?

Your idea is a good one, but, as you suspected, you need to be more careful about this sort of manipulation of conditionally convergent series.

One way to carry out your argument correctly, but with only minor changes, is by looking at partial sums:

Let's write $$a_n=\begin{cases}1,&\text{ if }n\text{ is not a multiple of 8} \\-1,&\text{ if }n\text{ is a multiple of 8},\end{cases},$$ so that your series is $\sum_{n=1}^\infty \frac{a_n}{n}.$

Then for any natural number $N,$

\begin{align} \sum_{n=1}^{8N}\frac{a_n}{n} &= \sum_{n=1}^{8N}\frac1{n}-2\sum_{n=1}^N \frac1{8n} \\&=\sum_{n=1}^{8N}\frac1{n}-\frac1{4}\sum_{n=1}^N \frac1{n} \\&\ge\sum_{n=1}^{8N}\frac1{n}-\frac1{4}\sum_{n=1}^{8N} \frac1{n} \\&\quad\scriptsize{\quad\text{(because we can only be subtracting *more* positive numbers)}} \\&=\frac3{4}\sum_{n=1}^{8N}\frac1{n}, \end{align}

which approaches $\infty$ as $N$ approaches $\infty,$ since the harmonic series diverges.


To expand on Mitchell Spector's answer, let's generalize to the problem where every $b$th term is negated.

By the same argument, we get $$\begin{align} \sum_{n=1}^{bN}\frac{a_n}{n} &= \sum_{n=1}^{bN}\frac1{n}-2\sum_{n=1}^N \frac1{bn} \\&=\sum_{n=1}^{bN}\frac1{n}-\frac2{b}\sum_{n=1}^N \frac1{n} \\&\ge\sum_{n=1}^{bN}\frac1{n}-\frac2{b}\sum_{n=1}^{bN} \frac1{n} \\&=\left(1-\frac2{b}\right)\sum_{n=1}^{bN}\frac1{n} \end{align}$$

This is nice, since we can see that the divergence proof holds for $b \geq 3$, but fails for $b=2$. This is not strange, since the series for $b=2$ is known to converge to $\log 2$.


This proof isn't valid because of the Riemann series theorem; the original series could still converge even though some rearrangement of it diverges. It's important to focus on the partial sums.

You can argue along the lines that the series $$\sum_{k=0}^{\infty} \frac{1}{8k+1} = 1 + \frac{1}{9} + \frac{1}{17} + \cdots$$ already diverges by comparing its partial sums to the partial sums of the harmonic series $\frac{1}{8} \Big( 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n} \Big).$