This demo is based on this awesome Numberphile video about Ulam spirals. My rendition uses Archimedean spirals instead, which are also covered by Numberphile in this other video.
Lucio Paiva, 2018 luciopaiva.com