Quote:
Originally Posted by retina
So much plagiarism.You could have at least acknowledged your sources.
[edit]There are even a notes on the WP page that say:

This test
always uses base 2 for the Fermat test part, but I use the base which is the smallest integer b>=2 such that JacobiSymbol(b,n) = 1
Thus, this test not the same as my test.
Edit: n must be an
odd nonsquare number, if n is either even or square then we can know that n is composite (except n=2).