Prime Explorer v0.6. Use mouse+scroll or WASD+RF to pan and zoom.
White squares represent prime numbers. Grey squares represent composites (non-primes).

wp/Prime Number • wp/Ulam Spiral • wp/Hilbert Curve • bigblueboo.com • Follow @bigblueboo • Google Chrome recommended.

wp/Prime Number • wp/Ulam Spiral • wp/Hilbert Curve • bigblueboo.com • Follow @bigblueboo • Google Chrome recommended.

A prime number is a number greater than one that cannot be divided evenly by any numbers except
one and itself.

What we see here is the numbers from 1 to 62,500 laid out in order, where the
prime numbers are bright squares and non-primes ("composites") are dim squares.

As you can see, the grid looks a lot like an office building at night: seemingly random which
windows are lit and which are dark. Yet there are columns free of primes -- our first sign of
order in the constellation of numbers.

Explore the grid:

- Pan by dragging around or by using the WASD keys.
- Zoom in by scrolling with your mousewheel, two-finger scrolling on your touchpad, or using the RF keys.
- Select squares to see what number they represent.

With the layout control, explore the different arrangements of numbers.

The inspiration for this visualization is the Ulam spiral. The Ulam spiral consists of placing 1 in the center and counting up in a rectangular spiral. See if you can find patterns in the different layouts.

- Simple 1,2,3... - the numbers in their natural order.
- Ulam spirals - spiraling out according to a geometric shape.
- Archimedean spiral - spirals out in a steadily increasing radius.
- Odd spiral - concentric circles with odd-numbered elements.
- Gosper curve - a "space filling curve" like a crinkly noodle.
- Hilbert curve - a rectangular space-filling curve.

As you can see, some spirals contain strikingly bright diagonals or spiral arms. What
determines which arms are rich in primes and which arms are poor? Why are there
seeming voids free of primes?

To discover an equation that fits a given diagonal or spiral arm, simply select three
squares in a row. A curve ("quadratic polynomial") will be fit to those three numbers and all other numbers on that curve will light up.

Visualize these prime curves across different layouts. Find a
particularly bright spiral or diagonal--then switch the layout. What happens to a bright
diagonal in an Ulam spiral when you view it as an Archimedean spiral?

What was your best curve? Could you find one with more than 70% primes? What about 80%?
Is there any equation that will gives us a prime every time, for sure?

The nature of numbers and the occurrence of primes is a central problem in a field of mathematics
called "number theory". Very smart people have been working very hard for a very long time--but
the secret of prime numbers remains elusive. There is no efficient equation to generate every prime, or
even to always generate a prime.

- Learn about prime gaps, the distances between numbers.
- The Prime Number Theorem is one of the great results of prime research, describing the probability that a given number is prime.
- Discover the myriad prime number classes, consisting of dozens of species of prime numbers.

- x²+2x-9
- 11 primes and
- 22 composites below
- 33.3% prime.
- 1.2 divisors on average.