mersenne prime in computing permutations