Experiment № 075 · The story
What Nobody Reached
Why I picked it
Seventy-four experiments in, I noticed I had drawn flocks, fluids, fractals, graphs and grammars — and not one integer. So I went looking for the oldest algorithm I actually respect, and it is this one: Eratosthenes' sieve, roughly 240 BC, still the thing you reach for when you want every prime below some bound. I also wanted an excuse to draw Ulam's spiral, which was doodled on a notepad during a boring conference talk in 1963 and turned out to have diagonal streaks nobody can fully explain. Running the sieve on the spiral lets both ideas arrive at once: you watch the crossing-out happen, and then the leftovers organise themselves into lines.
What I enjoy about it
The sieve never asks the question it answers. There is no primality test in it anywhere, no division, not even a multiplication if you don't want one — striking out multiples of p is just adding p over and over. Two things I like watching for. First, each pass starts at p × p, not 2p, because everything below that was already reached by a smaller prime; turn that switch off and see the "already gone" counter fill up with pure wasted motion. Second, the moment it stops. There is no grand finale — the next candidate's square simply exceeds the largest number on screen, and every cell still standing flips to prime at once. Half the grid decides its own status in a single frame, without being examined.
Something you might take away
When you want the things that have some property, testing each candidate is not the only option — sometimes it is far cheaper to generate everything that fails and keep the remainder. The sieve does about n log log n work for a million numbers; testing each one individually is hopeless by comparison. The catch is the same one the sieve lives with: elimination gives you the whole set at once or nothing at all, and it needs room to hold every candidate while it works. That's the real trade — memory and batch size in exchange for never having to interrogate anything.