Prove that $\sum_{k=0}^\infty \frac{1}{16^k} \left(\frac{120k^2 + 151k + 47}{512k^4 + 1024k^3 + 712k^2 + 194k + 15}\right) = \pi$ How to prove the following identity
$$\sum_{k=0}^\infty \frac{1}{16^k} \left(\frac{120k^2 + 151k + 47}{512k^4 + 1024k^3 + 712k^2 + 194k + 15}\right) = \pi$$
I am totally clueless in this one. Would you help me, please? Any help would be appreciated. Thanks in advance.
 A: This is the now famous Bailey–Borwein–Plouffe formula, see
http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula,
http://crd-legacy.lbl.gov/~dhbailey/dhbpapers/digits.pdf.
A: Here is a summary of the proof given by Bailey, Borwein, Borwein, and Plouffe in The Quest for Pi in only a few lines of integration.
To begin they note the following definite integrals as summations, $n=1,\ldots,7$:
$$ \int_0^{\frac{1}{\sqrt{2}}} \frac{x^{n-1}}{1-x^8} dx = 
     \int_0^{\frac{1}{\sqrt{2}}} \sum_{k=0}^\infty x^{n-1+8k} dx =
   \frac{1}{2^{n/2}} \sum_{k=0}^\infty \frac{1}{16^k(8k+n)}  $$
If the fractional factor of the summation in the Question is expanded by partial fractions:
$$ \frac{120k^2 + 151k + 47}{512k^4 + 1024k^3 + 712k^2 + 194k + 15} =
     \frac{4}{8k+1} - \frac{2}{8k+4} - \frac{1}{8k+5} - \frac{1}{8k+6}  $$
then the integrals above can be applied to give:
$$ \sum_{k=0}^\infty \frac{1}{16^k} \left( \frac{4}{8k+1} - \frac{2}{8k+4}
    - \frac{1}{8k+5} - \frac{1}{8k+6} \right) $$
$$ = \int_0^{\frac{1}{\sqrt{2}}}\frac{4\sqrt{2} -8x^3 -4\sqrt{2}x^4 -8x^5}{1-x^8} dx 
$$
At this point the authors claim a substitution of $y= x \sqrt{2}$, making:
$$ \int_0^{\frac{1}{\sqrt{2}}}\frac{4\sqrt{2} -8x^3 -4\sqrt{2}x^4 -8x^5}{1-x^8} dx =
    \int_0^1 \frac{16y-16}{y^4-2y^3+4y-4} dy $$
Finally the last integral may be expanded by partial fractions to give:
$$ \int_0^1 \frac{4y}{y^2-2} dy - \int_0^1 \frac{4y-8}{y^2-2y+2} dy = \pi $$
By way of explanation the authors point out that this rigorous proof was sought only after the discovery of the apparent integer relations among summations and $\pi$ via the PSLQ algorithm.
