chickadee » math » permutations

permutations n kprocedure
n
integer
k
integer

Returns the number of ways to choose a sequence of k items from a set of n items; i.e. the order of the k items is significant. Both arguments must be nonnegative.

When k > n, (permutations n k) = 0. Otherwise, (permutations n k) is equivalent to (/ (factorial n) (factorial (- n k))).

> (permutations 5 3)
60

Wikipedia: Permutations