What year comes next in the following sequence?
1973 1979 1987 1993 1997 1999
(In reply to
Any Easier way ? by Syzygy)
The layman's primality test is the Sieve of Eratosthenes. That's what you'd use if you are doing the test by hand without a table.
If testing large numbers by computer, the sieve no longer works (it's running time is exponential in the number of bits in the number). There are randomized algorithms that run in polynomial (in the number of bits) time with high probability, as well as a deterministic polynomial-time one discovered by a few folks at the India Institute of Technology a few years ago.
Edited on October 4, 2004, 11:06 am
Edited on October 4, 2004, 11:07 am