Functions dealing with prime numbers