Add nth_prime() precondition