Eli Bendersky personal blog

My favorite prime number generator

Many years ago I've re-posted a Stack Overflow answer with Python code for a terse prime sieve function that generates a potentially infinite sequence of prime numbers ("potentially" because it will run out of memory eventually). Since then, I've used this code many times - mostly because it's short and clear. In this…
Points
195
HN comments
83
Submissions
1
Cited by
0 commenters

Math & AlgorithmsSoftware Engineering2023

On Hacker News

SubmittedTitle on HNPointsComments
Aug 23, 2023My favorite prime number generator by mfrw19583

More from Eli Bendersky

All 57 posts →

Related posts from the same era