Find an example of series which converges only absolutely on $\mathbb Q$

We have that $$\sum_{n=1}^{\infty}\frac{(-1)^n}{n(n+1)}= \sum_{n=1}^{\infty}\left(\frac{(-1)^n}{n}+\frac{(-1)^{n+1}}{n+1}\right)=\sum_{n=1}^{\infty}\frac{(-1)^n}{n}+\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n+1}\\ =-\ln 2+(-\ln 2+1)=1-2\ln 2\in \mathbb R\setminus\mathbb Q $$ and $$\sum_{n=1}^{\infty}\frac{1}{n(n+1)}= \lim_{N\to+\infty}\sum_{n=1}^N\left(\frac{1}{n}-\frac{1}{n+1}\right)=\lim_{N\to+\infty}\left(1-\frac{1}{N+1}\right)=1\in \mathbb{Q}.$$

P.S. See here for $\sum_{n=1}^{\infty}\frac{(-1)^n}{n}=-\ln 2$.


A trivial example can be constructed by taking any $\sum_{i=2}^{\infty}r_i$ convergent and absolutely convergent on $\mathbb{Q}$ and add $r_0=5+(\pi-5)/2$, $r_1=(\pi-5)/2$. You get $$|r_0|+|r_1|=5+(\pi-5)/2-(\pi-5)/2=5$$ but you get $$r_0+r_1=5+(\pi-5)/2+(\pi-5)/2=5+\pi-5=\pi$$.

Note: You don't actually point out you want the original series made up of elements of $\mathbb{Q}$ but I realized that must be your intention.

But we can easily fix this.

Take $\{a_i\}_{i=0}^\infty$ such that $\sum_{i=0}^\infty a_i=r_0$ and $a_i>0$ for all $i$. Then take $\{b_i\}_{i=0}^\infty$ such that $\sum_{i=0}^\infty b_i=r_1$ and $b_i<0$ for all $i$. Then put alternate them ($c_{2n}=a_n$ and $c_{2n+1}=b_n$).

Notice that since everything converges absolutely you get the right answer.

Consider $$S_{2n}=\sum_{i=0}^{2n-1}c_n=\sum_{i=0}^{n-1} a_i+\sum_{i=0}^{n-1}b_i$$ And so since both converge absolutely you get the correct sum without absolute values and since you get $|a+b|=-(|a|+|b|)$ when both $a,b<0$. You get what you would expect in the absolute case aswell.

Further edit: A visual interpretation is that $r_0$ is a mid point between a larger rational and smaller irrational and the $r_1$ is a fix upwards to the rational if it's positive or downwards to the irrational if it's negative.

Yet another edit: You can actually show that all series meeting the requirements of the OP (with the restriction of $r_i$ to $\mathbb{Q}$ must be of this type.

First note that if $\sum_{i=0}^{\infty}|r_i|$ is in $\mathbb{Q}$ and $\sum_{i=0}^\infty r_i$ is not, then there must be infinitely many positive and negative $r_i$'s.

This follows easilly in two steps: First all can't be positive (otherwise both sums are the same) or negative (otherwise one sum is just the opposite of the other so both are in or out of $\mathbb{Q}$). Second if you have only finitely many positive/negative remove them, (their sum is in $\mathbb{Q}$) and the rest follows by first part.

Now we know that there are infinitely many positive and negative $r_i$'s and the whole sum is absolutely convergent. Thus all subsums are absolutely convergent. Now just split the sum of the positive terms and negative terms (those both converge by absolute convergence) and give you your $r_0$ and $r_1$ which have the property that $r_1<0$, $r_0>0$.


Let be $$\sqrt 2 = 1.0110101\dots = \sum_{i=0}^\infty a_i2^{-i}$$ with $a_i = 0,1$ and take $$\Sigma = 1 - \frac12+\frac14+\frac18-\frac1{16}+\cdots$$ (negative sign if the corresponding binary digit is $0$)

Then, as $$2 = 1.1111111\dots = 1.0110101\dots + 0.1001010\dots = \sqrt 2 + (2-\sqrt 2),$$ we have $\Sigma = \sqrt 2 - (2-\sqrt 2) = 2\sqrt 2 -2$ but $$1 + \frac12+\frac14+\frac18+\frac1{16}+\cdots = 2.$$