See also Rabin Miller.
In reply to Re: Simple primality testing by ambrus in thread Simple primality testing by ambrus