<jupyter_start><jupyter_text>Problem 7  $10001$st primeBy listing the first six prime numbers: $2, 3, 5, 7, 11$ and $13$, we can see that the $6$th prime is $13$.What is the $10 001$st prime number?OEIS Sequence: [A000040](https://oeis.org/A000040)  SolutionUsing sieve of Eratosthenes we could find $10001$st prime number by index. Under $100$ millions there more than $5%$ prime numbers. Therefore we can use sieve with size of $20n$.<jupyter_code>from euler.primes import prime_numbers
def compute(n: int) -> int:
    return list(prime_numbers(n * 20))[n - 1]
compute(6)
compute(10_001)
%timeit -n 100 -r 1 -p 6 compute(10_001)<jupyter_output>18.8278 ms ± 0 ns per loop (mean ± std. dev. of 1 run, 100 loops each)
{'fraction_non_alphanumeric': 0.11592178770949721, 'fraction_numerical': 0.10474860335195531, 'mean_word_length': 4.645669291338582, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '58201', 'license': 'MIT', 'n_tokens_mistral': 312, 'n_tokens_neox': 255, 'n_words': 101, 'path': 'problems/0007/solution.ipynb', 'repo_name': 'Dynortice/didactic-rotary-phone', 'size': '716'}