1
0
www.mikescher.com/www/statics/euler/Euler_Problem-058_explanation.md
Mike Schwörer ba579dab23
All checks were successful
Build Docker and Deploy / Build Docker (push) Successful in 45s
Build Docker and Deploy / Deploy to Server (push) Successful in 19s
replace mathblog.dk links with waybackmachine
2025-03-30 23:44:41 +02:00

502 B

It's obvious that the bottleneck of this program is the primality test. The numbers become here too big to create a sieve and "normal" prime testing takes too long. So we use the Miller-Rabin primality test that I implemented a while ago (thanks mathblog.dk).
The rest is just enumerating all the diagonals until primes*10<all