J scripts for calculating permutation groups