# How many different sums can you get when you “add up all the integers”?

Suppose you want to "add up all the integers" naively, by devising some way of arranging the integers in sequence and finding the limit of the partial sums of that sequence, possibly grouping up and pre-summing groups of integers. You could represent this formally by defining a function $$f : \mathbb{N} \to \{\mathbb{Z}\}$$ subject to

1. $$\forall n \in \mathbb{Z}. \exists i \in \mathbb{N}. n \in f(i)$$
2. $$\forall i, j, n \text{ with } i \not= j. n \in f(i) \implies n \not\in f(j)$$
3. Every $$f(i)$$ is a finite set

and taking the following limit: $$\lim_{n\to\infty}\sum_{i=1}^{n} \Sigma f(i)$$

There are at least 3 different limits you can obtain with different choices of $$f$$:

1. $$f(i) = \{i, -i\}$$ produces the sequence $$0, 1 + -1, 2 + -2, \ldots$$. Since every term is 0, the limit is 0 as well.
2. $$f(i) = \{1 + i, 1 - i\}$$ produces the sequence $$1, 2 + 0, 3 + -1, 4 + -2, \ldots$$. Since each term after the first sums to 2 the limit is $$+\infty$$.
3. $$f(i) = \{-1 + i, -1 - i\}$$ produces the sequence $$-1, 0 + -2, 1 + -3, 2 + -4, \ldots$$. Since each term after the first sums to -2, the limit is $$-\infty$$.

My question is: Are 0, $$+\infty$$, and $$-\infty$$ the only possible limits? Is it possible with a clever choice of $$f$$ to get a limit of, say, 10, or any other number? (It's clearly also true that there are plenty of legal $$f$$s that lead to the limit not existing; I'm not interested in that here.)

Fun note: This question is inspired by a discussion I had with a roommate long ago, who wrote a poem with the line "the sum of all the numbers is zero" based on the reasoning I gave above. I pointed out that infinite series are weird and immediately came up with the two other "sums" I've listed here. Ever since then, and I've been wondering if there are other "sums." I can't find any but also can't prove that none exist.

You'll be happy to know that the roommate discussed the issue with his poetry professor, who allowed the line even though the mathematics turned out to be dubious.

• +1 For a fun question! I chuckled at the end :) – Sambo Jul 24 '19 at 19:11

Another way to describe your sequence of finite sets $$f(i)$$ is that it is a partition of the integers.
Suppose we construct $$f(i)$$ as follows:
• $$f(0)=\{q\}$$ where $$q$$ is some arbitrarily chosen integer.
• For $$i>0$$, the set $$f(i)$$ has four elements. Two of these elements are the greatest negative integer and least non-negative integer that are not in any $$f(j)$$ for $$j The remaining elements are any two integers distinct from the first two and not in any $$f(j)$$ for $$j such that the sum of the four integers is zero. (There will always be two such integers.)
Now your series sum is $$q.$$ This can be any integer you like.
It may be inconvenient to write a formula for $$f(i)$$ in the way you would like, but you can certainly compute $$f(i)$$ for any $$i$$ by working out the sequence of sets that precedes it. As soon as you write an algorithm to obtain the last two elements of each set, the sequence is deterministic.