# $\sum_{n=0}^{\infty}(-1)^n a_n = \pi$, $a_n\in \mathbb Q$ and not $a_n$ not monotonic

How can I construct a sequence $\{a_n\}$ of positive rational numbers, which is not monotonic such that $$\sum_{n=0}^{\infty}(-1)^n a_n = \pi$$ I thought a lot on this question but I always come up with a monotonic sequence. Any help will be appreciated.

-
Take your favorite sequence $(a_i)$ of rationals such that your sum converges to $\pi$. Form a new series as follows: after the $a_i$ become less than $1/10$, insert terms $1/10$ and $- 1/10$ as appropriate. After the $a_i$ become less than $1/100$, insert terms $1/100$ and $-1/100$ as appropriate ... – David Mitra May 12 '13 at 0:40
pick your favorite monotonic sequence such that $\sum (-1)^n a_n = \pi$, and then swith $a_0$ with $a_2$. – mercio May 12 '13 at 1:13

From Madhava formula, we have $$\pi = 4 - \dfrac43 + \dfrac45 - \dfrac47 \pm = \sum_{n=0}^{\infty}\dfrac{(-1)^n 4}{(2n+1)}$$ We can write $\dfrac1{2n+1} = \dfrac{k\sqrt{n}+1}{2n+1} - \dfrac{k\sqrt{n}}{2n+1}$. Hence, we have $$\pi = \sum_{n=0}^{\infty} \left( (-1)^n\dfrac{\sqrt{n}+4}{2n+1} + (-1)^{n+1}\dfrac{\sqrt{n}}{2n+1}\right) = \sum_{n=0}^{\infty}(-1)^n a_n$$ Writing it out, we see $$\pi = \dfrac{\sqrt{0} + 4}{2 \cdot 0 + 1} - \dfrac{\sqrt{0}}{2 \cdot 0 + 1} + \dfrac{\sqrt{1}}{2 \cdot 1 + 1} - \dfrac{\sqrt{1} + 4}{2 \cdot 1 + 1} + \dfrac{\sqrt{2} + 4}{2 \cdot 2 + 1} - \dfrac{\sqrt{2}}{2 \cdot 2 + 1} + \dfrac{\sqrt{3}}{2 \cdot 3 + 1} - \dfrac{\sqrt{3} + 4}{2 \cdot 3 + 1} + \cdots$$ where $a_n$'s are as desired, i.e., $$a_n = \begin{cases} \dfrac{\sqrt{2k}+4}{2 \cdot (2k)+1} & \text{ if n = 4k}\\ \dfrac{\sqrt{2k}}{2 \cdot (2k)+1} &\text{ if n=4k+1}\\ \dfrac{\sqrt{2k+1}}{2 \cdot(2k+1)+1} & \text{ if n=4k+2}\\ \dfrac{\sqrt{2k+1}+4}{2 \cdot(2k+1)+1} & \text{ if n=4k+3}\end{cases}$$ Below is the pictorial representation of the sequence $a_n$. The first $44$ values of this sequence are plotted. As you can see from the figure below, the sequence oscillates up and down and is not monotonic. Below is the convergence of the partial sum $\displaystyle \sum_{n=0}^N a_n$ to $\pi$. The $\color{red}{\text{red line}}$ is the value of $\pi$ for reference. You can see how the partial sums converge to $\pi$.

I didn't see $a_n \in \mathbb{Q}$. Here is the answer if you want $a_n \in \mathbb{Q}$. $$\dfrac1{2n+1} = \dfrac2{2n+1} - \dfrac1{2n+1}$$ Hence, $$\pi = \sum_{n=0}^{\infty} \left({(-1)}^n\dfrac{8}{2n+1} + (-1)^{n+1} \dfrac4{2n+1}\right)$$ $$\pi = \dfrac81 - \dfrac41 + \dfrac43 - \dfrac83 + \dfrac85 - \dfrac45 \pm \cdots$$ Now choose $a_n$'s as follows. $$a_n = \begin{cases}\dfrac{8}{4k+1} & \text{ if n=4k}\\ \dfrac4{4k+1} & \text{ if n=4k+1}\\ \dfrac4{4k+3} & \text{ if n=4k+2}\\ \dfrac8{4k+3} & \text{ if n=4k+3}\end{cases}$$

-
I see how you solved it and loved the way you justified it. Thanks a ton. I really appreciate it.. – keanureeves May 12 '13 at 2:08

There are a few methods possible for achieving this. One is to make use of Newton's method as it applies to $\sin(x)$ (which will repeatedly overestimate the step by a small amount). That is,

$$\Delta x = -\frac{\sin(x)}{\cos(x)} = -\tan(x)$$ Choose a starting value slightly above $\pi$, say $a_0=3.5$. Then let $a_n=-\tan(\sum_{i=0}^{n-1} a_i)$. Each term will then be of opposing sign relative to the one before it, and it will converge rapidly to $\pi$.

EDIT:

Oh, just noticed the "$a_n\in\mathbb{Q}$" condition. This can be enforced by simply using a rational approximation to $\tan$ for each step, simply requiring that it be, for instance, $\frac1m$ for the integer $m$ that makes it nearest to the value of $\tan$ that is a longer step than $\tan$ itself. For instance, the first iteration has $a_1=-\tan(3.5)\approx -0.374$. The nearest value of $m$ is thus $3$, but that makes it a smaller step, so choose $2$, and you have $a_1=-\frac12$.

Then, $-\tan(3)\approx 0.142$, which is nearest to $\frac17$, but that's too short a step, so we take $\frac16$. Now $-\tan(3+1/6)\approx -0.0251$, so the nearest is $\frac1{40}$, but again, too big a step, so use $m=39$. And so on. The sequence of values of $m$ is thus (in absolute value, for each step): $$2, 6, 39, 1763...$$

-
Thanks for taking time to look at my question. I appreciate it – keanureeves May 12 '13 at 2:08

As a conditionally convergent series can be rearranged to give any value at will, use your favorite of those series (mine happens to be $\sum_{n \ge 1} \frac{(-1)^n}{n}$). The trick is to pick positive terms until the sum is larger than your target $\pi$ (there is $a_0$), then pick enough negative terms to fall bellow (your $a_1$), and keep going.

No, not exactly a nice set of terms, and it can be considered cheating as you need to know your target beforehand.

-

if $\sum_{n=0}^{\infty}(-1)^n a_n$ is absolutely convergent then all rearrangement will still converge to the same value.

So take any sum $\sum_{n=0}^{\infty}(-1)^n a_n = \pi$ that is absolutely convergent and rearrange them in a way that are not monotonic.

-
I needed that statement to understand the question. Thanks – keanureeves May 12 '13 at 2:09