18 March 2012

Primal Noise


You need to enable JavaScript to see this post.

This is what the first 1000 prime numbers look like when you plot them using their binary representation, one after the other. Are there fractal patterns in this image, like noise on a phone line? I don't know. Maybe I'll discuss it in another post.

This image is created by first translating each number in its binary string (e.g. decimal 53 to binary 110101), then converting each '1' into a little black square and each '0' into a blank space.

The image is produced using simple JavaScript scode. Have a look at the page source if you're interested. Search for 'var primes', 'function createRow' and 'function createTable'. I used jQuery to simplify it a little bit.