Added nth_prime(n) function