Prime Numbers Interval Visualization

This tool allows for visualization of prime numbers in a specified interval – one interval per row. Each prime number is represented by a coloured square. The color of the square depends on the last digit of the prime number. Numbers which are not prime numbers are represented by a blank space.

Inspired by Dr. Vicky Neale's question in this YouTube video.



Interval (integers per row)

Number of integers (primes and non-primes) per row. If you, for example, enter "30", then the first row will represent the numbers 1 through 30, the second row 31 through 60, the third row 61 through 90, and so on.

Point size (pixels)

The size (width and height) in pixels of each represented integer. To see large scale patterns, chose a smaller size. To better be able to see smaller patterns, chose a larger size.

Quantity of prime numbers

The number of prime numbers to display. A maximum of the first 1 000 000 prime numbers can be displayed.

Some Observations

Interesting Intervals

By "interesting intervals" I mean intervals, which produce the most organized structures. To see the difference, compare, for example, the interval 236 to the interval 210. While 236 seems like a more or less random arrangement, 210 is highly structured, with prominent blank areas, interspersed with single color columns.

It seems that the most organized patterns result at intervals which correspond to multiplying prime numbers consecutively, starting from 2 * 3 * 5

The intervals listed above have some characteristics in common:

Other intervals

Other intervals also have interesting characteristics:


List of first 1 000 000 primes downloaded from


Marek Kyncl