math.combinatorics: produce type of sequence in selections.
math.combinatorics: make permutations-quot to reduce code duplication.