Patrick Ludl

The Sieve of Atkin

The Sieve of Atkin and Bernstein is a modern algorithm to compute the prime numbers smaller than N. I wrote a literate program implementing it, following the Wikipedia article Sieve of Atkin.

The literate program for the Sieve can be found here as html file. The original markdown code can be downloaded here. The markdown file was translated to Julia code with an LLM (Open AI GPT4o). The generated code can be viewed here in html and can be downloaded here as source code. On my computer the program needs about 11 seconds to compute the prime numbers smaller than 10 9 .