Added a method to get the nth prime