commands → binomial

binomial(n,k)

The binomial command computes binomial coefficients: n!/(n-k)!/k! where n >= k are non-negative integers. This is the number of ways to choose k elements from n without replacement.

Examples

# 5 choose 2
binomial(5,2);
	10

References

Gullberg, Jan. Mathematics: From the Birth of Numbers. Norton, 1996.