Modules to assist generating or checking for prime numbers