Prime spiral (Ulam spiral)
From Math Images
Ulam spiral |
---|
Ulam spiral
- The Ulam spiral, or prime spiral, is a plot in which prime numbers are marked among positive integers that are arranged in a counterclockwise spiral. The prime numbers show a pattern of diagonal lines.
Contents |
Basic Description
The prime spiral was discovered by Stanislaw Ulam (1909-1984) in 1963 while he was doodling on a piece of paper during a science meeting. Starting with 1 in the middle, he wrote positive numbers in a grid as he spiraled out from the center, as shown in Image 1. He then circled the prime numbers, and the prime numbers showed patterns of diagonal lines as shown by the grid in Image 2. The grid in Image 2 is a close-up view of the center of the main image such that the green line segments and red boxes in the center of the main image line up with those in Image 2.
A larger Ulam spiral with 160,000 integers and 14,683 primes is shown in the main image. Black dots indicate prime numbers. In addition to diagonal line segments formed by the black dots, we can see white vertical and horizontal line segments that cross the center of the spiral and do not contain any black dots, or prime numbers. There are also white diagonal line segments that do not contain any prime numbers. Ulam spiral implies that there is some order in the distribution of prime numbers.
A More Mathematical Explanation
From time immemorial, humans have tried to discover patterns among prime numbers. Currently, there is [...]
From time immemorial, humans have tried to discover patterns among prime numbers. Currently, there is no known simple formula that yields all the primes. The diagonal patterns in the Ulam spiral gives some hint for formulas of primes numbers.
Definition of Half-lines
Many half-lines in the Ulam spiral can be described using quadratic polynomials . A half-line is a line which starts at a point and continues infinitely in one direction. In this page, we only consider half-lines that are horizontal or vertical, or have a slope of -1 or +1. The half-lines that can be described using quadratic polynomials are the ones in which each entry of the diagonal is positioned on a different ring of the spiral.
The ring of a spiral can be considered as the outermost layer of a concentric square or a rectangle centered around the center of the spiral, 1, as defined by the blue line in the grid. Although there is no exact place where we can determine the beginning and end of a ring, we will assume that entries that are positioned on squares or rectangles of the same sizes to be on the same ring. For instance, 24, 25, 26, 27, 28, which are shown in red boxes in Image 3, are on the same ring, whereas 48, 49, 50, 51, 52, as shown in blue boxes, are on a different ring because they are positioned on a bigger square.
The green lines in the Image 3 qualify as diagonal half-lines whereas the red lines do not because the red lines cross the corner of the grid in a way that two entries of the red diagonal line are positioned on the same ring.
Thus, diagonal line segments that are composed of prime numbers can also be expressed as outputs of quadratic polynomials. To learn more about the relation between the diagonal lines and quadratic polynomials, click below.
Examples of quadratic polynomials for half-lines
For instance, prime numbers , which are aligned in the same diagonal, can be described through the output of the polynomial for . Similarly, numbers , which are also aligned in a green diagonal in Image 5 starting from the center and continuing to the upper right corner, can be expressed by:
for . (We will refer back to this polynomial in a later section) In fact, the part of the green diagonal that starts from the center and continues to the bottom left corner can also be described through Eq. (1) for .
In fact, even horizontal and vertical line segment in the grid can be described by quadratic polynomials, as long as the lines satisfy the condition that no two entries are positioned on the same ring. For instance, the blue horizontal line segment in Image 5, can be described by a quadratic polynomial. However, the sequence on the same horizontal line cannot be described by a polynomial because the entries 9 and 10 are on the same ring.
Moreover, it is not hard to show that the green diagonal line from Image 5 that goes through the center and has a slope of +1 is the only line on which the Ulam numbers in both directions can be described by the same polynomial. Even the red diagonal line that goes through the center and has a slope of -1 cannot be described by one polynomial.
Half of the red diagonal, the segment going up from the center, can be described by for inputs that are even numbers, while the diagonal going down from the center, is a sequence of perfect squares of odd numbers. Thus we cannot find one polynomial that generates both all entries of the red diagonal.
Euler's Prime Generator
Many have come up with polynomials in one variable that generate prime numbers, although none of these polynomials [...]
Many have come up with polynomials in one variable that generate prime numbers, although none of these polynomials can generate all the prime numbers. One of the most famous polynomials is the one discovered by Leonhard Euler(1707-1783), which is :
Euler's polynomial generates distinct prime numbers for each integer from to .
As we can see in Image 6, we can start an Ulam's spiral with 41 at the center of the grid and get a long, continuous diagonal with 40 prime numbers. One interesting fact is that the 40 numbers in the diagonal line segment are the first 40 prime numbers that are generated through Euler's polynomial. Moreover, the prime numbers are not aligned in order of increasing values. In fact, with 41 in the center, other prime numbers alternate in position between the upper right and lower left part of the diagonal.
Sacks Spiral
Sacks spiral is a variation of the Ulam spiral that was devised by Robert Sacks in 1994. Sacks spiral places 0 in th [...]
Sacks spiral is a variation of the Ulam spiral that was devised by Robert Sacks in 1994. Sacks spiral places in the center and places nonnegative numbers on an Archimedean spiral , whereas the Ulam spiral places in the center and places other numbers on a square grid. Moreover, Sacks spiral makes one full counterclockwise rotation for each square number , as shown in the image below. The darker dots indicate the prime numbers.
We can also see that numbers that have blue check marks and are aligned in the left side of the spiral are pronic numbers . For example, .
Moreover, these numbers are aligned in positions that are a little less than half of one full rotation from one perfect square to the next perfect square, for instance, from 4 to 9, or 9 to 16. Let the th perfect square be . Then, going from the th perfect square to the st perfect square, the difference between the two numbers will be . We can show this by calculating the difference between two consecutive perfect squares,
Because the pronic numbers are positioned a little less than half of one full rotation from the perfect squares, their position is a little less than from the th perfect square as we go around the spiral. Indeed, any pronic number , and the pronic number with the form is aligned at the th position from the origin. From this, we can see that pronic number that has the form appears as the th number along the spiral from the th perfect square.
An interesting pattern can be discovered when we start the spiral at 41. As the image below shows, the red dots are the first 40 prime numbers generated by Euler's polynomial, and they are aligned in the center and positions where pronic numbers used to be in the original Sacks spiral.
Other Numbers and Patterns
Triangular Number
A number is a triangular number if number of dots can be arranged into an equilateral triangle evenly filled with the dots. As shown in theimage below, the sequence of triangular numbers continue as .
The triangular number, , is given by the formula :
When we mark the triangular numbers in a Ulam spiral, a set of spirals are formed as shown in the image below.
Prime numbers in lines
The Ulam spiral inspired the author of this page to create another table and find a pattern among prime numbers. Firs [...]
The Ulam spiral inspired the author of this page to create another table and find a pattern among prime numbers. First, we create a table that has 30 columns and write all the natural numbers starting from 1 as we go from left to right. Thus, each row will start with a multiple of 30 added by 1, such as 1, 31, 61, 91, 121, ... . When we mark the prime numbers in this table, we get Image 14.
We can see that prime numbers appear only on certain columns that had 1, 7, 11, 13, 17, 19, 23, 29 on their first row. This image shows that all prime numbers have the form:
Note that not all numbers generated by this form are prime numbers. Another point to notice in the picture is that the nonprime numbers that appear on prime-concentrated columns are all multiples of prime numbers larger than or equal to 7. For instance, . In fact any combination of two prime numbers larger than or equal to 7 all appear on these prime-concentrated columns.
To learn more about the reason for such alignment of prime numbers, click below.
Why It's Interesting
Not much is discovered about the Ulam spiral. For instance, the reason for the diagonal alignment of prime numbers or the vertical and horizontal arrangement of non-prime numbers is not clear yet. Indeed, Ulam spiral is not heavily studied by mathematicians. However, Ulam spiral's importance lies on the fact that it shows a clear pattern among prime numbers.
Some might suspect that we are seeing diagonal lines in the Ulam spiral because the human eye seeks patterns and groups even among random cluster of dots. However, we can compare Image 16 and Image 17 and see that the prime numbers actually have a distinct pattern of diagonal lines that random numbers do not have. Image 17 is a Ulam spiral where the black dots denote for the prime numbers, and Image 17 is a Ulam spiral of random numbers.
People are interested in the pattern among prime numbers because the pattern might give enough information for us to discover a new polynomial that will generate more prime numbers than previously-discovered polynomials. The discovery of formula for prime numbers can lead us to have better understanding of other mysterious conjectures and theories involving prime numbers, such as twin prime conjecture or Goldbach's conjecture. For more information about the twin prime conjecture or Goldbach's conjecture, go to Wolfram Math World :Twin Prime Conjecture or Wolfram Math World :Goldbach Conjecture.
Teaching Materials
- There are currently no teaching materials for this page. Add teaching materials.
Future Directions for this Page
- An explanation for the patterns appearing among triangular numbers in Triangular number section
- An helper page for Archimedean Spiral in Sacks Spiral section
Leave a message on the discussion page by clicking the 'discussion' tab at the top of this image page.