Caution: Distraction ahead.
Summary: Visualizations of Ulam Spirals.
Recently a brief discussion evolved into an hour of visualizations of the compositeness of numbers. A number that is the power of a prime seems to be closer to a prime than a number that has lots of prime factors. ω(n) is the number of distinct prime factors of n, a notion which is used here and there.
How to visualize the compositeness of a number? We tried a few approaches, some of which we'll show in future posts. For now, here are some views of the integers from 3 to 10,000, with 3 in the middle and the rest winding around it. All of these images were created with Mathematica.
Each cell is colored based on its omega. The greener, the more composite (so to speak).
A variation, this time showing the structure of each number:
Each number is represented by a square that depicts the number's prime factorization.
Color is given by the size (so to speak) of the largest prime in the factorization. We did experiment with some 3D representations.
But we didn't like those as much.
Here are some closer views of the 2D representations. Click an image to get a larger version.
If there's any interest, we can make our PDF versions available. We did one version up to 40,000:
A wall-sized print would be interesting.