Unexpected Beauty in Primes
medium.com
medium.com
e.g.
... ... ...
9 is not prime, because you can fill all rows evenly.
... .. ..
7 is, because you can't fill all the rows evenly. So the gaps make lines...
Or to put it another way, the lines in the Ulam spiral are the pixels next to the corner pixels that make full rectangles that can't be made full rectangles another way.
https://www.youtube.com/watch?v=EK32jo7i5LQ
The video is only about Archimedian spirals, but I suspect a similar analysis would apply to Ulam spirals too. We really like to find patterns.They're also anything but random as the author suggests. We've known that much since the 1st century.
They're cool to look at, but there's nothing that earth shattering here.