3 ms·
Related: https://en.wikipedia.org/wiki/Sieve_of_Sundaram https://en.wikipedia.org/wiki/Sieve_of_Sundaram Very easy to implement and much faster than even sieve
by pathikrit 11y ago
Related: https://en.wikipedia.org/wiki/Sieve_of_Sundaram https://en.wikipedia.org/wiki/Sieve_of_Sundaram
Very easy to implement and much faster than even sieve of Atkin with a complexity of O((n log n)/12)