$\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.

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}$$
