Write a function that returns the nth prime number corresponding to the number n passed.

// • Do not worry about overflow. Assume that a long will hold all required values.

// • Optimize for readability and compactness, not speed.

// • Do not use any complex math formulas to calculate it.

// • Do not use any math operators beyond addition, subtraction, multiplication, division.//

// Examples:

// GetPrime(1) == 2 // the first prime number is 2

// GetPrime(2) == 3 // the second prime number is 3

// GetPrime(3) == 5 // the third prime number is 5

// GetPrime(4) == 7 // the fourth prime number is 7

// GetPrime(5) == 11 // the fifth prime number is 11

// GetPrime(1000) == 7909 // the thousandth prime number is 7909

Here is a link showing pseudo-code to determine if a number is prime:

http://www.java2s.com/Code/CSharp/Language-Basics/DetermineifanumberisprimeIfitisnotthendisplayitslargestfactor.htm

(pseudo, because it's in C#)