nth_prime in ruby