flag a prime based on whether prime or not...efficiently
Read this post on petrushkagoogol2.blogspot.com