Skip to content
Primes visualized over an Ulam Spiral in HTML5
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
prime_conspiracy.html
twin_primes_ulam_spiral.html
ulam_spiral.html

README.md

Twin primes visualized over an Ulam Spiral

Two numbers p and q are twin primes if they are primes and |p – q | = 2.

The Ulam spiral, discovered by the mathematician Stanislaw Ulam in 1963, is a simple method to visualization prime numbers. Put the numbers in a spiral and draw only the ones which are primes.

In the visualization below, I’m drawing the prime numbers in two shades of green. Twin primes in light green and regular primes in dark green.

twin primes ulam spiral

This “vortex effect” is created because every twin prime is followed by its twin two steps before in the spiral. Below the same image with the zoom in the center:

twin primes ulam spiral

The Prime Conspiracy

See details at http://silveiraneto.net/2016/03/14/the-prime-conspiracy-visualized-over-an-ulam-spiral-in-html5/.

conspiracy ulam spiral

in HTML5

[http://silveiraneto.net/wp-content/uploads/2013/05/twin_primes_ulam_spiral.html](HTML5 demo with Canvas + Javacript). Be aware that this page can be computational intensive and freeze your browser for a few seconds.

try it yourself

git clone https://github.com/silveira/ulam

And open the html files in a modern browser.

This content was posted originally on my personal blog.

You can’t perform that action at this time.