Thank you Wolfram|Alpha.
Input: sum of Prime[i] for i=49999951..50000000
Output: 49122557320
Of course the "correct" way to solve this problem is finding a fast enough primality testing routine for nine-digit numbers. Plain sieving wouldn't help, so I'd use SPRP-based testing maybe.
Sum Some Primes
the guy with wolfram|alpha solution won gold, so I guess silver goes to me:
http://primes.utm.edu/nthprime/index.php#nth
The 49,999,951st prime is 982,450,649
using that, I built a program using php and gmp_php library for the "gmp_nextprime" function, and summed up to 5000000th element
http://primes.utm.edu/nthprime/index.php#nth
The 49,999,951st prime is 982,450,649
using that, I built a program using php and gmp_php library for the "gmp_nextprime" function, and summed up to 5000000th element
-
- Posts: 12
- Joined: Sun Oct 26, 2008 4:33 pm
I found and used
http://compoasso.free.fr/primelistweb/p ... ine_en.php
after using https://www.dcode.fr/prime-numbers-search to find out my starting number
The rest was a tiny php summing up.
Am I a hacker now?
http://compoasso.free.fr/primelistweb/p ... ine_en.php
after using https://www.dcode.fr/prime-numbers-search to find out my starting number
The rest was a tiny php summing up.
Am I a hacker now?