Every time I see that thing, I want to take a huge chunk of prime numbers and write code to visualize them in different ways as quickly as possible. How do they look if you put them in, say, a hexagonal grid instead of a square one? Do patterns emerge if you draw them on a Hilbert curve? A 3D Hilbert curve? 4D? Has anyone tried these? Am I crazy for wanting to? Why are the ducks watching me?
Arthur C. Clarke described the prime spiral seven years before it was discovered by Ulam in his 1956 novel 'The City and the Stars': "Jeserac sat motionless within a whirlpool of numbers. The first thousand primes, expressed in the binary scale that had been used for all arithmetical operations since electronic computers were invented, marched in order before him. Endless ranks of 1's and 0's paraded past, bringing before Jeserac's eyes the complete sequences of all those numbers that possessed no factors except themselves and unity. There was a mystery about the primes that had always fascinated Man, and they held his imagination still.
Jeserac was no mathematician, though sometimes he liked to believe he was. All he could do was to search among the infinite array of primes for special relationships and rules which more talented men might incorporate in general laws. He could find how numbers behaved, but he could not explain why. It was his pleasure to hack his way through the arithmetical jungle and sometimes he discovered wonders that more skilful explorers had missed.<p>He set up the matrix of all possible integers, and started his computer stringing the primes across its surface as beads might be arranged at the intersections of a mesh. Jeserac had done this a hundred times before and it had never taught him anything. But he was fascinated by the way in which the numbers he was studying were scattered, apparently according to no laws, across the spectrum of the integers. He knew the laws of distribution that had already been discovered, but always hoped to discover more."
I'm one of those guys who didn't necessarily pay a lot of attention to maths in college - not that I don't see the value in it, but it is certainly not a core interest. However, I've been slowly getting more and more into maths and the science of primes. So this post (and the questions the Ulam spiral <i>asks</i>) strike me at the worst of times and the best of times.<p>If you're at least a bit like me (no deep knowledge of maths, but growing curiosity) I recommend checking out BBC's recent documentary on primes, called <i>'The Music of the Primes'</i>. It'll spark your interest, and it'll make you want to dig a little deeper.
Vi Hart has a great video which takes the Ulam spiral as its starting point: <a href="http://www.youtube.com/profile?user=Vihart#p/u/0/Yhlv5Aeuo_k" rel="nofollow">http://www.youtube.com/profile?user=Vihart#p/u/0/Yhlv5Aeuo_k</a><p>If you don't know her work, you should. She's so much fun...
Any time I see research or visualizations of primes, I get nervous. I fear that all of our online security is based on encryption and all of that is based on the one-way nature of prime functions.<p>Can you imagine a world where someone discovers a way to trivially decode every https or ssh session on the internet? I fear we are building a city on top of the fog.
Another interesting site concerning visualization of patterns in prime numbers:<p><a href="http://www.divisorplot.com/" rel="nofollow">http://www.divisorplot.com/</a><p><a href="http://www.divisorplot.com/6.html" rel="nofollow">http://www.divisorplot.com/6.html</a> -- the Ulam spiral
One of my mathematics teachers used to regard prime numbers with considerable irritation. She tried to explain to the class why there was no simple formula to determine which numbers were primes. In the end, she gave up and moved on to the next part of the syllabus, leaving the question unanswered. I almost felt sorry for asking her in the first place. Almost.<p>If this mathematics teacher had had access to the diagram of the Ulam spiral, however, I imagine that this alone could have provided the impetus for at least one student - me - to have made an academic career out of mathematics. As it is, she committed many other crimes against education, including her infamous catchphrase "Don't bother studying any kind of pointless mathematics that you'll never need to use at work." A catchphrase whose validity has been refuted many times over the years, not the least with the discovery of this diagram.
Something that's always struck me as odd is the "importance" of prime numbers. It seems so trivial that a number having only 1 and itself as common divisors would be useful or special. Nevertheless, they're important indeed.<p>In other words, I'm struck by the ability of mathematics to generate such apparent complexity from simple principles :)
"It is a visual representation of just how little we know about the structure of the primes"<p>Come on, really? It's an intriguing visualization, but the patterns (in so far as they are real, and not an artefact of the limited size of the spiral) can be explained with some high school math.
Similar visualizations here:<p><pre><code> http://blog.morphism.com/2010/05/building-numbers.html
http://blog.morphism.com/2010/07/pdfs-from-building-numbers.html
</code></pre>
That stuff was generated using Mathematica.
What if prime numbers can actually plotted as a fractal, i.e. they have fractal geometry? I bet they do, since fractals showing up in more and more unexpected places in nature, physics, and math.