Fast C++ prime number generator