Reference
- Factorial: n! = n × (n − 1) × (n − 2) × … × 1, with 0! = 1 by definition
- Double factorial: n!! = n × (n − 2) × (n − 4) × … down to 2 (even n) or 1 (odd n)
- Stirling's approximation: n! ≈ √(2πn) · (n/e)n
n! is the product of all positive integers from 1 to n. Example: 5! = 5×4×3×2×1 = 120.