Deal with prime power factors of n - 1.