Copyright (c) 2017 Bart Massey
After thinking about it for a while, here's what I came up with as a series of semi-plausible automated compiler optimizations that would untangle the Day 23 inner loop.
Let's start with the raw loop. I wrote it in Go, because
reasons. The f
flag is set to false iff b
is
composite. This is what I call "trial multiplication": try