Prime Number Spiral
The User Manual, Part 2

2. Customization of the display

There are seven ways in which the display of the spiral can be customized:

 The spiral can be drawn beginning at 1 or at any number up to 2,147,208,022. The numbers on the spiral can be represented by circles or by squares. These can be displayed in eight different sizes, from 75 pixels to 1 pixel, in which case the graphics screen shows (respectively) from 49 to 275,675 numbers in the spiral. Display of numerals within the circles or squares can be enabled or disabled. A background grid can be displayed or not. The circles and squares can be colored in six different ways, or shown all in white (see upper drop-down menu at right). Instead of the prime numbers it is possible to show (i) random numbers, (ii) only square numbers, (iii) only triangular numbers or (iv) all numbers (see lower drop-down menu at right). The distribution of numbers selected randomly is similar to the distribution of prime numbers (see below). Thus it is possible to compare the patterns generated by the prime numbers with random patterns, to ascertain whether there is a difference (there is).

When the program is re-run it starts up in the same state as when the program last finished.

Examples will now be given of the display resulting from various combinations of these parameters, and the color schemes will be explained.

Color primes by cluster

Prime numbers which are adjacent to each other on the same diagonal (and which thus belong to a single cluster of primes) usually have the same color.

 Color primes by NW-SE diagonal Here all numbers are shown. The NW-SE diagonals are colored starting with the central diagonal (the one which passes through the central number, 1 in this case) with color blue. Then diagonals to the NE or SW of this are colored successively as green, cyan, red, magenta and yellow, after which the color cycle begins again with blue, green ... The sequence of colors is shown at the bottom. Color primes by SW-NE diagonal This is the same as above except that numbers along diagonals running SW to NE have the same color.

The number of elements in the longest diagonal sequence of primes (or whatever is selected to be shown) is computed automatically, for both the NW-SE direction and for the SW-NE direction (whatever color scheme is in effect). For example:

Color primes by ring number

Ring 1 is the central number. Ring 2 consists of the eight numbers surrounding this, ring 3 consists of the 16 numbers surrounding ring 2, and so on. The colors of the rings cycle through the same colors as above:

Color primes by sequence color

The sequence colors simply cycle through the five (not six) colors:

If the five colors above are numbered 0 through 4 then the nth number (where the central number is the 1st number) has sequence color (n-1) mod 5. Or in other words, the sequence color of the nth number is the ((n-1) mod 5)+1th of the five colors.

Color primes by Palmen color

The Palmen color of a number is explained in Karl Palmen's Colours of Numbers. All prime numbers are either red, green, blue or black.

If (and only if) the central number is odd then each NW-SE diagonal either (i) contains only red or black primes or (ii) contains only blue or green primes.

No color (white only)