Calculate permutations A(n,r), combinations C(n,r) and factorials. Useful for checking combinatorics and probability exercises.