Random Prime Generator/Modular Arithmetic
Bryan Olson
fakeaddress at nowhere.org
Sun Mar 5 20:47:46 EST 2006
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
More information about the Python-list
mailing list