prime permutations brute force