Simplify $\pi = 2 \sum_{n=0}^{\infty} \frac{\left(\frac{1}{2}\right)_n \left(\frac{1}{2}\right)_n}{\left(\frac{3}{2}\right)_n} \frac{1^n}{n!}$

pisequences-and-series

I'd like to make this series self contained by not relying upon outside knowledge such as Pochhammer symbols

$$\pi = 2 \sum_{n=0}^{\infty} \frac{\left(\frac{1}{2}\right)_n \left(\frac{1}{2}\right)_n}{\left(\frac{3}{2}\right)_n} \frac{1^n}{n!}$$

Tried something ugly like

$$2 \sum_{n=0}^{\infty} \frac{(\frac{1}{2}(\frac{3}{2})\cdots(\frac{1}{2}+n-1))^2}{\frac{3}{2}(\frac{5}{2})\cdots(\frac{3}{2}+n-1)n!} $$

but not sure if it's an equivalent formula or could be tidied up further?

The main reason is I'd like to write a simple C program to calculate this $\pi$ formula based on $n$.

Edit

Based upon the accepted answer, the new formula is

$$\large \pi = \sum_{n=0}^{\infty} \frac{(2n-1)!!}{2^n \cdot (n+\frac{1}{2}) \cdot n!}$$

or without the double factorial

$$\large \pi = \sum_{n=0}^{\infty} \frac{(2n)!}{2^{2n} (n!)^2} \cdot \frac{2}{2n+1}$$

Best Answer

If all you're looking for is a simplification you can use the definition $(a)_n=\Gamma(a+n)/\Gamma(a)$ and the property $\Gamma(z+1)=z\Gamma(z)$ to write $$ \begin{aligned} \pi &=2\sum_{n=0}^\infty\frac{(1/2)_n (1/2)_n}{(3/2)_n} \frac{1^n}{n!}\\ &=2\frac{\Gamma(3/2)}{\Gamma(1/2)}\sum_{n=0}^\infty\frac{\Gamma(1/2+n) }{\Gamma(3/2+n)} \frac{(1/2)_n}{n!}\\ &=\sum_{n=0}^\infty\frac{1}{1/2+n}\frac{(1/2)_n}{n!}. \end{aligned} $$

If you cannot use the Pochhammer symbol but double factorials are fine note that $$ (1/2)_n=\frac{1}{2}\cdot\frac{3}{2}\cdot\frac{5}{n}\cdots\frac{2n-1}{2}=\frac{1\cdot 3\cdot 5\cdots(2n-1)}{2^n}=\frac{(2n-1)!!}{2^n} $$ So that we have the equivalent form $$ \begin{aligned} \pi &=\sum_{n=0}^\infty\frac{(2n-1)!!}{1/2+n}\frac{2^{-n}}{n!}. \end{aligned} $$

Typing

Sum[1/(1/2 + n) Factorial2[2 n - 1]/n! 1/2^n, {n, 0, Infinity}]

into Mathematica does in fact return the value $\pi$.


Edit:

I do not write in C but chat GPT does. Here is C code to sum up the first eleven terms

#include <stdio.h>
#include <math.h>

double factorial2(int n) {
    double res = 1;
    for (int i = 1; i <= n; i++) {
        res *= (2 * i - 1);
    }
    return res;
}

int main() {
    int n;
    double sum = 0;
    for (n = 0; n <= 10; n++) {
        double term = 1 / ((1.0 / 2) + n) * factorial2(2 * n - 1) / tgamma(n + 1) * pow(0.5, n);
        sum += term;
    }
    printf("%.15f\n", sum);
    return 0;
}
Related Question