# Revision history [back]

### How to calculate the double factorial in SageMath?

I would like to implement the square root of 2 power series:

$\sqrt{2} = 1-\sum_{n=1}^{\infty}{\frac{(-1)^n (2n-3)!!}{2^n \times n!}}$

(which I obtained from the Maclaurin series of $\sqrt{1+x}$ with $x=1$) in SageMath but I cannot seem to find the double factorial function in the SageMath docs. Is there one? I suppose if a double factorial function is not available I could use this method of finding the double factorial that I found on Wolfram Mathworld:

$\Gamma(n+\frac{1}{2}) = \frac{(2n-1)!!}{2^n}\sqrt{\pi}$

### How to calculate the double factorial in SageMath?

I would like to implement the square root of 2 power series:

$\sqrt{2} = 1-\sum_{n=1}^{\infty}{\frac{(-1)^n 1-\sum \limits_{n=1}^{\infty}{\frac{(-1)^n (2n-3)!!}{2^n \times n!}}$

(which I obtained from the Maclaurin series of $\sqrt{1+x}$ with $x=1$) in SageMath but I cannot seem to find the double factorial function in the SageMath docs. Is there one? I suppose if a double factorial function is not available I could use this method of finding the double factorial that I found on Wolfram Mathworld:

$\Gamma(n+\frac{1}{2}) = \frac{(2n-1)!!}{2^n}\sqrt{\pi}$

### How to calculate the double factorial in SageMath?

I would like to implement the square root of 2 power series:

$\sqrt{2} = 1-\sum \limits_{n=1}^{\infty}{\frac{(-1)^n (2n-3)!!}{2^n \times n!}}$

(which I obtained from the Maclaurin series of $\sqrt{1+x}$ with $x=1$) in SageMath but I cannot seem to find the double factorial function in the SageMath docs. Is there one? I suppose if a double factorial function is not available I could use this method of finding the double factorial that I found on Wolfram MathworldMathWorld:

$\Gamma(n+\frac{1}{2}) = \frac{(2n-1)!!}{2^n}\sqrt{\pi}$

### How to calculate the double factorial in SageMath?

I would like to implement the square root of 2 power series:

$\sqrt{2} = 1-\sum \limits_{n=1}^{\infty}{\frac{(-1)^n -\sum \limits_{n=0}^{\infty}{\frac{(-1)^n (2n-3)!!}{2^n \times n!}}$

(which I obtained from the Maclaurin series of $\sqrt{1+x}$ with $x=1$) in SageMath but I cannot seem to find the double factorial function in the SageMath docs. Is there one? I suppose if a double factorial function is not available I could use this method of finding the double factorial that I found on Wolfram MathWorld:

$\Gamma(n+\frac{1}{2}) = \frac{(2n-1)!!}{2^n}\sqrt{\pi}$