prime permutation script