N'th Prime

This is a companion discussion topic for the original entry at https://toph.co/p/n-th-prime

why this is given:

sympy is an external module and thus is not supported by Toph.
You can use standard library functions and standard modules only.
It is the same for any other online judges.

I am getting RE in the 3rd case can someone please tell me what might be the reason?