Let's consider the alternating harmonic series $S_n = 1-\frac12 + \frac13 - \cdots + (-1)^n\frac1n$.
By rearranging its terms, we get $S_n = (1-\frac12)-\frac14 + (\frac13-\frac16)-\frac18 + (\frac15-\frac1{10})-\cdots$.
This equals to $S_n = \frac12-\frac14 + \frac16-\frac18 + \frac1{10}-\cdots$.
By extracting $\frac12$ as common factor, we get:
$S_n = \frac12(1-\frac12 + \frac13-\frac14 + \cdots)$. So in essence, $S_n = \frac12 S_n$, therefore $1=\frac12$.
I have read the wikipedia article about Riemann series and roughly my understanding is that if the series converges, we can rearrange the terms and get any other number, or even to diverge. What could be an acceptable explanation of the paradox? Obviously 1 does not equal $\frac12$! In which of the above steps lies the error?