primes in v2.9, but Harsh told me it was slow. I found a simple

optimization that has improved the speed by a factor of 8! (Where is

an emoticon when you need one?) If sieving with multiple values of k,

the improvement isn't quite so dramatic. Simply put, I don't evaluate

n ^n mod p unless I know that there is a value of k such that k*n^n +/-1

has not been sieved out.

Enjoy,

Mark