It looks like we no longer need to use a brute force method to find out if a number is prime. Manindra Agrawal Figured out how to do it in 13 lines of code. His "Primes in P" paper shows how do to it. You will need a postscript viewer like ghostview to see it though. Acrobat won't do it.