Sunday, April 15, 2007

1 - 2 + 3 - 4 + 5 - 6 + ... made easy

One of the top links on reddit right now is about the infinite series 1 - 2 + 3 - 4 + 5 -6 + ...

The wikiepedia entry is interesting, but it involves some math that I don't quite understand. Apparently the other reddit readers don't understand it either, since one of the top comments there says, "Really, there's no sum (the sum is undefined). 1/4 is just some number that mathematicians can use to compare sequences like that."

The answer 1/4 is a little less arbitrary than that!

Instead, try simply doing the arithmetic:
1 = 1
1 - 2 = -1
1 - 2 + 3 = 2
1 - 2 + 3 - 4 = -2
1 - 2 + 3 - 4 + 5 = 3
1 - 2 + 3 - 4 + 5 - 6 = -3

See the pattern? It's 1, -1, 2, -2, 3, -3, 4, -4, 5, -5...

What happens if we plot those points on a graph and then draw separate lines for the positive and negative numbers? (first point at position [0,1], the second at [1,-1], third at [2,2], fourth at [3,-2], etc)

The line of positive numbers is defined by the equation y = x/2 + 1
The line of negative numbers is defined by the equation y = -x/2 - 0.5


Notice that the two lines intersect at y = 0.25, which also happens to define the line midway between the other two lines (since they have slopes of +1/2 and -1/2).

It seems that if we "average" the two equations, like so:
(y + y) / 2 = ((x/2 + 1) + (-x/2 - 0.5)) / 2
simplified:
y = (x/2 - x/2 + 1 - 0.5) / 2
simplified:
y = 1/4

Yay!

I don't know if a real mathematician would approve of my method, but at least it's easy to understand.

5 comments:

Manoj said...

Is there something wrong with the following analysis?

A simple rewrite of the sequence intuitively shows that the sum does not converge:

We could rewrite this as:

1- (2-3) - (4- 5) - (6-7)...

= 1 - (-1) - (-1) - (-1).......

= 1 + 1 + 1 ......

Of course the sum does not converge. Adding 1 infinite times is infinite.


If the sequence were finite, I believe we can come up with a function to compute the sum as a function of the number of elements, right????

Ashwin said...

You can't arbitrarily move around terms in an infinite series. Such moving around can change the convergence properties and can also change the final value

Unknown said...

What tool did you use to generate your graph? It's quite nice looking.

Paul Buchheit said...

gnuplot. It's actually not very good, but it's all I know...

Amit said...

For the sum of integers to be a fraction, mathematicians have to be insane. Don't trust mathematicians.