While Gottfried Leibniz is commonly given credit for the infinite series shown above, it was previously known by the
Scotch mathematician James Gregory, as the inverse tangent series (Gregory's Series), where the tangent is 1:
where \(tan^{1}\,x=x\frac{x^3}{3}+\frac{x^5}{5}\frac{x^7}{7}+\frac{x^9}{9}\cdots\)\((1 \le x\le 1)\)
\(\frac{\pi}{4}=tan^{1}\,1=1\frac{1}{3}+\frac{1}{5}\frac{1}{7}+\frac{1}{9}\cdots\)
It is also noteable that this series is easily modified to give \(\frac{\pi}{2}\), \(\pi\), or any other multiple
thereof, by simply changing the numerators:
\(\frac{\pi}{2}=2\frac{2}{3}+\frac{2}{5}\frac{2}{7}+\frac{2}{9}\cdots\)
\(\pi=4\frac{4}{3}+\frac{4}{5}\frac{4}{7}+\frac{4}{9}\cdots\)
A simplified version of this in my own algorithmic notation looks like this:
\(\pi=\sum\limits_{k=0,\,[n=3]}^{\infty}\frac{8}{n\leftarrow 32k+n}\)
Each iteration of this algorithm is extremely fast and is quite simple to code:
1) Let \(k=0\) and \(n=3\).
2) Perform \(32k+n\) and assign this value to \(n\).
3) Divide \(8\) by the result of step 2 (divide by new value of \(n\)) and add this result to the sum.
4) Increment \(k\) and go back to step 2.
Of course, some logic needs to be added to either terminate after some number of iterations or when some amount of
precision is reached.
I have also come up the the following equations based on this series:
\(\pi=\sum\limits_{k=0}^{\infty}\frac{8}{16k^2+16k+3}\)
\(\pi=\sum\limits_{k=0}^{\infty}\frac{8}{(4k+1)(4k+3)}\)
\(\pi=\sum\limits_{k=0}^{\infty}\big(\frac{4}{4k+1}\frac{4}{4k+3}\big)\)
\(\pi=\frac{1}{2}\sum\limits_{k=0}^{\infty}\frac{1}{(k+\frac{3}{4})(k+\frac{1}{4})}\)
