combinatorics routines in Lisp