Hard
Prime Generator
Write an infinite generator of primes. Print the n-th prime (1-based).
Input
One integer n ≥ 1.
Output
The n-th prime.
Sample 1
Input
1
Output
2
Sample 2
Input
10
Output
29
Output appears hereOne integer n ≥ 1.
The n-th prime.
1
2
10
29
Output appears here