Routines for combinatorics.
