A library of functions for finding prime numbers effeciently