Takes a num, n, and returns the nth prime.