Euler Problem 7
===============

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.

What is the 10,001st prime number?


```python
MAX = 200000
index = 10001
sieve = [True] * MAX
prime_count = 0
for p in range(2, MAX):
    if sieve[p]:
        prime_count += 1
        if prime_count == index:
            print(p)
            break
        for n in range(p*p, MAX, p):
            sieve[n] = False
```

    104743


The Sympy module makes this problem even easier.


```python
from sympy import prime
print(prime(index))
```

    104743



```python

```

a744f6cc4d6b1f032eb6099848c9c7b09bd609f0
ipynb
Jupyter Notebook
Euler 007 - 10001st prime.ipynb
Radcliffe/project-euler
5eb0c56e2bd523f3dc5329adb2fbbaf657e7fa38
MIT
2016-05-11T18:55:35.000Z
2019-12-27T21:38:43.000Z
Euler 007 - 10001st prime.ipynb
Radcliffe/project-euler
5eb0c56e2bd523f3dc5329adb2fbbaf657e7fa38
MIT
Euler 007 - 10001st prime.ipynb
Radcliffe/project-euler
5eb0c56e2bd523f3dc5329adb2fbbaf657e7fa38
MIT
Qwen/Qwen-72B
1. YES
2. YES

