First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 7 years ago

dan_fulea gravatar image

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.)

click to hide/show revision 2
No.2 Revision

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.)