Tuvas wrote: [...] > Actually, I did another test, and realized that it was indeed a bug in > the code. Yikes. Oh well, thanks for the help in identifying it! > > An example that would be alot easier is this: > >>>>Mod(16,561).is_strong_pseudo_prime() > > True
Hmmm...my M-R tester disagrees... Ah, there's another bug in is_strong_pseudo_prime(). While your exponent 'x' is even, you do the test with x, not necessarily x/2. Incidentally, the lowest base for which 561 is strongly pseudo-prime is 50. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list