# 贝利-波尔温-普劳夫公式

${\displaystyle \pi =\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {4}{8k+1}}-{\frac {2}{8k+4}}-{\frac {1}{8k+5}}-{\frac {1}{8k+6}}\right)\right]}$

${\displaystyle \alpha =\sum _{k=0}^{\infty }\left[{\frac {1}{b^{k}}}{\frac {p(k)}{q(k)}}\right]}$

## 特例

${\displaystyle P(s,b,m,A)=\sum _{k=0}^{\infty }\left[{\frac {1}{b^{k}}}\sum _{j=1}^{m}{\frac {a_{j}}{(mk+j)^{s}}}\right]}$

### 已知的BBP式

{\displaystyle {\begin{aligned}\ln {\frac {9}{10}}&=-{\frac {1}{10}}-{\frac {1}{200}}-{\frac {1}{3\ 000}}-{\frac {1}{40\ 000}}-{\frac {1}{500\ 000}}-\cdots \\&=-\sum _{k=1}^{\infty }{\frac {1}{10^{k}\cdot k}}=-{\frac {1}{10}}\sum _{k=0}^{\infty }\left[{\frac {1}{10^{k}}}\left({\frac {1}{k+1}}\right)\right]\\&=-{\frac {1}{10}}P\left(1,10,1,(1)\right)\end{aligned}}}
{\displaystyle {\begin{aligned}\ln 2&={\frac {1}{2}}+{\frac {1}{2\cdot 2^{2}}}+{\frac {1}{3\cdot 2^{3}}}+{\frac {1}{4\cdot 2^{4}}}+{\frac {1}{5\cdot 2^{5}}}+\cdots \\&=\sum _{k=1}^{\infty }{\frac {1}{2^{k}\cdot k}}={\frac {1}{2}}\sum _{k=0}^{\infty }\left[{\frac {1}{2^{k}}}\left({\frac {1}{k+1}}\right)\right]\\&={\frac {1}{2}}P\left(1,2,1,(1)\right)\end{aligned}}}

{\displaystyle {\begin{aligned}\arctan {\frac {1}{b}}&={\frac {1}{b}}-{\frac {1}{b^{3}3}}+{\frac {1}{b^{5}5}}-{\frac {1}{b^{7}7}}+{\frac {1}{b^{9}9}}+\cdots \\&=\sum _{k=1}^{\infty }\left[{\frac {1}{b^{k}}}{\frac {\sin {\frac {k\pi }{2}}}{k}}\right]={\frac {1}{b}}\sum _{k=0}^{\infty }\left[{\frac {1}{b^{4k}}}\left({\frac {1}{4k+1}}+{\frac {-1}{4k+3}}\right)\right]\\&={\frac {1}{b}}P\left(1,b^{4},4,(1,0,-1,0)\right)\end{aligned}}}

### π的BBP公式

{\displaystyle {\begin{aligned}\pi &=\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {4}{8k+1}}-{\frac {2}{8k+4}}-{\frac {1}{8k+5}}-{\frac {1}{8k+6}}\right)\right]\\&=P\left(1,16,8,(4,0,0,-2,-1,-1,0,0)\right)\end{aligned}}}

${\displaystyle \pi =\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {120k^{2}+151k+47}{512k^{4}+1024k^{3}+712k^{2}+194k+15}}\right)\right]}$

#### π的BBP位抽取算法

${\displaystyle \pi =4\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+1)}}-2\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+4)}}-\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+5)}}-\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+6)}}}$

${\displaystyle \sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+1)}}=\sum _{k=0}^{n}{\frac {1}{(16^{k})(8k+1)}}+\sum _{k=n+1}^{\infty }{\frac {1}{(16^{k})(8k+1)}}}$

${\displaystyle \sum _{k=0}^{\infty }{\frac {16^{n-k}}{8k+1}}=\sum _{k=0}^{n}{\frac {16^{n-k}}{8k+1}}+\sum _{k=n+1}^{\infty }{\frac {16^{n-k}}{8k+1}}}$

${\displaystyle \sum _{k=0}^{n}{\frac {16^{n-k}\mod 8k+1}{8k+1}}+\sum _{k=n+1}^{\infty }{\frac {16^{n-k}}{8k+1}}}$

${\displaystyle 4\Sigma _{1}-2\Sigma _{2}-\Sigma _{3}-\Sigma _{4}.\,\!}$

## 推广

D.J.布拉德赫斯特提出了一种BBP算法的泛化形式。[10]这种形式可以用于在接近线性时间和对数空间下求很多其他的常数。例如卡塔兰常数${\displaystyle \pi ^{3}}$${\displaystyle \log ^{3}2}$阿培裏常数${\displaystyle \zeta (3)}$（其中${\displaystyle \zeta (x)}$黎曼ζ函數），${\displaystyle \pi ^{4}}$${\displaystyle \log ^{4}2}$${\displaystyle \log ^{5}2}$${\displaystyle \zeta (5)}$，还有很多${\displaystyle \pi }$${\displaystyle \log 2}$的不同幂次。这些结果主要是使用多重对数函数polylogarithm ladder）得到的。