Prime Spirals
I knew I had to make Ulam spirals when I saw Numberphile’s video about them. I wrote Python code to generate these where colors alternate with each concentric square. I made a GitHub repository for the code. A visit to a page of Matthew Conroy gave me the notion to map sequences other than primes too. Factorials, the Fibonacci sequence, and Mersenne primes make for sparse Ulam spirals, but I like them for that fact that they show which sequences are spread far out. For each sequence, there are four images for the numbers 1–10,201, 1–160,801, 1–361,201, and 1–1,002,001.
I made a few I found at the OEIS browse page when I watched for sequences that would fit this type, which, as it turned out, Ulam spirals transmuted from sequences to QR codes.😛
- A030513 Numbers with 4 divisors.
- A037003 Positions of the digit 4 in the decimal expansion of 𝜋.
- A050704 Composite numbers k with the property that k minus the sum of the prime factors of k is prime.
Image Gallery
Click or tap a thumbnail for the full resolution.