Proving that $\pi=\sum\limits_{k=0}^{\infty}(-1)^{k}\left(\frac{2^{2k+1}+(-1)^{k}}{(4k+1)2^{4k}}+ \frac{2^{2k+2}+(-1)^{k+1}}{(4k+3)2^{4k+2}}\right)$ Long time ago I've been playng with formulas for $\pi$ and found that one above in the title which can also be expressed as 
\begin{align*}
\;\pi=\sum_{k=0}^{\infty}\left(\frac{2^{4k+1}+1}{(8k+1)}+\frac{2^{4k+2}-1}{(8k+3)2^{2}}-\frac{2^{4k+3}-1}{(8k+5)2^{4}}-\frac{2^{4k+4}+1}{(8k+7)2^{6}} \right )\frac{1}{2^{8k}}
\end{align*}
Unfortunately I can't find in my notes how I derived it. I remember that I used some trick. I've seen similar formulas on Wikipedia but not this one. Does anyone knows how to derive this kind of formulas? 
Thanks.

Just for clarification: The formula in the title is just a shortened version because the second one was bigger than 150 chars and the system didn't accept it, but I prefer the second. I think its more elegant. So I'm looking for a way to derive any of the two. 
 A: See the update for the answer to question. Below follows a proof that the series are the same.
Here is how I did it:
Note that every positive integer can be written either as an even or odd number (of the form $2k$ for $k \in \mathbb{N}$ and $2k+1$ respectively). Then, since your sum goes through all the integers, it is the same as: 
$$
\begin{align}
&\sum_{k=0}^{\infty}  \left(\frac{2^{4k+1}+1}{(8k+1)}+\frac{2^{4k+2}-1}{(8k+3)2^{2}}-\frac{2^{4k+3}-1}{(8k+5)2^{4}}-\frac{2^{4k+4}+1}{(8k+7)2^{6}} \right)\frac{1}{2^{8k}}\\
&=\sum\limits_{k=0}^{\infty}(-1)^{2k}\ \left(\frac{2^{4k+1}+(-1)^{2k}}{(8k+1)2^{8k}}+ \frac{2^{4k+2}+(-1)^{2k+1}}{(8k+3)2^{8k+2}} \right)\\
&+\sum\limits_{k=0}^{\infty}(-1)^{2k+1} \left(\frac{2^{4k+3}+(-1)^{2k+1}}{(8k+5)2^{8k+2}}+ \frac{2^{4k+4}+(-1)^{2k+2}}{(8k+7)2^{8k+3}}\right)
\end{align}
$$
The two sum expressions are simply your original sum, but with $2k$ respectively $2k+1$ inserted instead of k. 
Update
I misunderstood the question. How to derive this series should be easy to find here:
http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula
