Blake Stacey directed me towards a terrific tool for embedding TeX code into a web page. So how about we do ourselves a math post!
Remember the harmonic series? No doubt you encountered it in some calculus class or other. It’s the one that goes like this:
$$
1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\frac{1}{6}+\dots
$$
The series is divergent. If you keep adding more and more of the terms your running tally will just get bigger and bigger forever.
There are many ways to show that it is divergent. If you remember your calculus then you know there is a little gadget called the integral test that settles things very quickly. A more elementary argument goes like this. First we group our terms thusly:
$$
1+\frac{1}{2}+\left( \frac{1}{3}+\frac{1}{4} \right) +
\left( \frac{1}{5}+\dots+\frac{1}{8} \right)
+\left( \frac{1}{9}+\dots+ \frac{1}{16} \right) \dots
$$
We group things so that the final term in each grouping has a power of two on the bottom. If you keep in mind that fractions get smaller as their denominators get bigger, then we can say that the sum above must be larger than this:
$$
1+\frac{1}{2}+\left( \frac{1}{4}+\frac{1}{4} \right)+
\left( \frac{1}{8}+\dots+\frac{1}{8} \right)+
\left( \frac{1}{16}+\dots+\frac{1}{16} \right) \dots
$$
But now it is easy to see that each of the groupings adds up to one half. That means we are effectively adding one half to itself infinitely many times, which clearly gets bigger and bigger forever.
You might then wonder about how many terms we have to throw out before we get something that converges. For example, suppose we only kept the fractions with prime number denominators:
$$
\frac{1}{2}+\frac{1}{3}+\frac{1}{5}+\frac{1}{7}+\frac{1}{11}+\frac{1}{13} \dots
$$
Since the prime numbers are very sparse you might think that the series would now converge. But you would be wrong. This still diverges, though the proof will have to wait for a different post.
What if we only kept the perfect squares. Now it converges! In fact, we have:
$$
1+\frac{1}{4}+\frac{1}{9}+\frac{1}{16}+\frac{1}{25}+\dots=\frac{\pi^2}{6}
$$
That the series converges at all is easily shown with standard techniques of calculus. That it adds up to pi squared over six is harder to show, so we will save that for a different post too.
Now for the interesting part. Suppose we took the harmonic series, but changed every other plus sign to a minus sign. The result would be the alternating harmonic series, and it converges! In fact, we get this:
$$
1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\frac{1}{5}-\frac{1}{6}+\dots= \ln 2
$$
This equation can be proved using the Taylor series for the natural logarithm. Since the harmonic series diverges, but the alternating harmonic series converges, we say the harmonic series is “conditionally convergent.” This distinguishes it from an absolutely convergent series, which still converges even if you turn all the negative terms into positive terms.
What happens if you start rearranging the terms in the series? Intuitively that really should not change anything. Addition is commutative, right, meaning that it just does not matter the order in which you add things up. That’s often true for infinite series. For example, if you take our series with the perfect squares on the bottoms and jumble up the terms however you like, the result will still be pi squared over six. So far so good.
One day, during a college class in real analysis (which is basically a calculus class where you stop to prove all the details you used to take for granted) my professor casually tossed off the fact that with a conditionally convergent series it is always possible to rearrange the terms to make them add up to anything you like. He was quickly on to other things, and I figured I must have heard him wrong. It just sounded too absurd.
But it’s really true! I can rearrange the terms in the alternating harmonic series so that they add up to any real number at all. Rational, irrational, integer, doesn’t matter. I can make the series diverge if I wanted to. As an example, I will show how to make the series add up to zero.
The first step is to separate the positive terms from the negative terms. The positive terms are
$$
1, \phantom{x} \frac{1}{3}, \phantom{x} \frac{1}{5}, \phantom{x} \frac{1}{7},
\phantom{x} \frac{1}{9}, \dots
$$
while the negative terms are
$$
\frac{1}{2}, \phantom{x} \frac{1}{4}, \phantom{x} \frac{1}{6}, \phantom{x} \frac{1}{8},
\phantom{x} \frac{1}{10} \dots
$$
If we add up the positive terms separately and the negative terms separately, we would find that both are divergent. That follows from the fact that the original series was only conditionally convergent. If our two separated series both converged, then they would still both converge if we made the negative terms positive. But then the original series would be absolutely convergent.
A similar argument will show that you cannot have one of the series be convergent while the other is divergent. Thus, the only possibility is that both are divergent on their own.
Now for the rearrangement:
$$
1-\left(\frac{1}{2}+\frac{1}{4}+\frac{1}{6}+\frac{1}{8}\right)+\left(\frac{1}{3}\right)-\left(\frac{1}{10}+\frac{1}{12}\right)+\left(\frac{1}{5} +\dots \right)
$$
It may not look very promising, but watch what happens when you start adding up terms. We began with 1. Then we added four negative terms in a row. After adding the fourth negative number the running total becomes negative for the first time. Then we start adding positive terms until the running total is positive again. It turns out that only requires one positive fraction. Then we add two more negative fractions to make the running total negative once more. Then we add enough positive fractions to make the running total positive once more.
Since the separated series of positive and negative terms both diverge, we know that we will always have enough of each of them to make the running total positive or negative as needed. And since the individual fractions are getting smaller and smaller, we know that the amount by which we overshoot, or undershoot, zero will get smaller and smaller as well. In the limit, the running total (or “sequence of partial sums” as we say in the biz) will converge to zero.
No doubt you see how to adapt that to make the series converge to whatever you like. If you want it to add up to pi, for example, just add up positive terms until the sum is bigger than pi. Then take negative terms until the sum goes down below pi. Then go back to the positive terms, and so on.
Pretty neat, and very counterintuitive. We tend to use the familiar terminology of addition when we are dealing with infinite series. That makes it easy to forget that finite sums and infinite sums are very different beasts.