Reva Solutions interview question

Write a function to find nth prime number