Functions relating to Prime Numbers