cache the result of generate-nth-prime
renamed to get-nth-prime