Prime number related code