# How can we convert double sums to single sums?

Let's say that $n\to A(n),B(n)$ is a bijection from $\mathbb{N} \to \mathbb{N^2}$. This would be the inverse of a pairing function.

The canonical example would be

$B(n)= n-\frac{1}{2}\lfloor \frac{\sqrt{8n+1}-1}{2}\rfloor \lfloor \frac{\sqrt{8n+1}+1}{2} \rfloor$

$A(n) = \lfloor \frac{\sqrt{8n+1}-1}{2}\rfloor-B\left(n\right)$

Then is it the case that

$$\sum_{b=0}^\infty \sum_{a=0}^\infty{f(a,b)}=\sum_{n=0}^\infty f(A(n),B(n))?$$

I assume that if I am given that LHS is absolutely convergent the equality holds for any pairing function. I would guess that this is overkill however.

If $\sum_{b=0}^\infty \sum_{a=0}^\infty{f(a,b)}$ is conditionally convergent we still may be able to find a suitable $A(n),B(n)$.

Questions

1) What conditions are required for this equality to hold?

2) I don't know a whole lot about double sums. Is this a standard technique? Where can I learn more?

3) Where can I find more pairing functions? I can't imagine that the one above is the most convenient to work with...

Example

Let's say $f(a,b)=\frac{1}{(a+1)^2(b+1)^2}$

Then it's easy enough (Given we know the solution of the Basel problem) to find the left hand side is $\pi^4/36$. But to find what the righthand side looks like is going to be tricky. We have a new series of rationals that approaches $\pi^4/36$. It's $\frac{1}{4}+\frac{1}{4}+\frac{1}{9}+\frac{1}{25}+\dots$ it doesn't have such a nice pattern to it because of our selection of the functions $A,B$.

## 1 Answer

The fact that you're initially presenting this as a double sum is irrelevant. In the end, this is just about rearrangements of series. Different bijections of $\mathbb N$ to $\mathbb N^2$ correspond to different rearrangements of the series.

The Riemann series theorem says that a conditionally convergent series can be rearranged to converge to any real number, or diverge to $+\infty$ or $-\infty$.