Written just for educational purposes. If you need performance, choose anything else. This version is written to understand how it works.
You have to tune primes and sieving_array_size before lauching.
Using of pypy interpreter is strongly recomended.
Answer: 1819935140393 and 1001338283189
real 0m10.255s user 0m10.154s sys 0m0.082s