Solution for problem 7; n-th prime