Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One quick(ly found) possibility would be to import factorial2 from sympy, sample code:

sage: factorial2(99)
2725392139750729502980713245400918633290796330545803413734328823443106201171875
sage: factorial(100) / factorial(50) / 2^50
2725392139750729502980713245400918633290796330545803413734328823443106201171875
sage: ?factorial2

Note that factorial2 is defined for both odd and even natural numbers. (Also for negative odd ones.)

One quick(ly found) possibility would be to import factorial2 from sympy, sample code:

sage: from sympy import factorial2
sage: factorial2(99)
2725392139750729502980713245400918633290796330545803413734328823443106201171875
sage: factorial(100) / factorial(50) / 2^50
2725392139750729502980713245400918633290796330545803413734328823443106201171875
sage: ?factorial2

Note that factorial2 is defined for both odd and even natural numbers. (Also for negative odd ones.)