Patterns found in Prime Numbers

A new analysis by Princeton University researchers has uncovered patterns in primes that are similar to those found in the positions of atoms inside certain crystal-like materials.

The discovery may aid research in both mathematics and materials science. “Prime numbers have beautiful structural properties, including unexpected order, hyperuniformity and effective limit-periodic behavior,” said Torquato. “The primes teach us about a completely new state of matter.”

“What’s fascinating about this paper is that it gives us a different perspective on the primes: instead of viewing them as numbers, we can view them as particles and try to map out their structure via X-ray diffraction,” said Henry Cohn, a principal researcher at Microsoft Research who was not involved with the study. “It turns out to give us the same sort of information as traditional number-theoretic methods, and to tie in beautifully with previous work. It’s a beautiful new perspective on this information, and it opens up new connections with materials science and scattering theory.”


Researchers at Princeton have discovered a similarity between the patterns of atoms in certain crystal-like materials and prime numbers. Here, red dots denote non-prime numbers and black dots denote prime numbers, which are treated as “atoms.” Image courtesy of the researchers

The researchers found a surprising similarity between the sequence of primes over long stretches of the number line and the pattern that results from shining X-rays on a material to reveal the inner arrangement of its atoms. The analysis could lead to predicting primes with high accuracy, said the researchers.

here is much more order in prime numbers than ever previously discovered,” said Salvatore Torquato, Princeton’s Lewis Bernard Professor of Natural Sciences, professor of chemistry and the Princeton Institute for the Science and Technology of Materials. “We showed that the primes behave almost like a crystal or, more precisely, similar to a crystal-like material called a ‘quasicrystal.’”

Primes are numbers that can only be divided by 1 and themselves. Very large primes are the building blocks of many cryptography systems. Primes appear to be sprinkled randomly along the number line, although mathematicians have discerned some order. The first few primes are 2, 3, 5, 7 and 11, becoming more sporadic higher in the number line.

Torquato and his colleagues have found that that, when considered over large swaths of the number line, prime numbers are more ordered than previously believed, falling within the class of patterns known as “hyperuniformity.”

Hyperuniform materials have special order at large distances and include crystals, quasicrystals and special disordered systems. Hyperuniformity is found in the arrangement of cone cells in bird eyes, in certain rare meteorites, and in the large-scale structure of the universe.

The team showed that the order they found in the prime numbers maps to the pattern that results when X-rays interact with certain forms of matter. As a chemist, Torquato is familiar with X-ray crystallography, shining X-rays through a crystal’s three-dimensional atomic lattice. With diamonds or other crystals, this will result in a predictable pattern of bright spots or peaks, known as Bragg peaks.

Compared to typical crystals, quasicrystals yield a distinct and more complex arrangement of Bragg peaks. The peaks in a typical crystal form at regular intervals with empty gaps between them. In quasicrystals, between any two selected Bragg peaks is another Bragg peak.

The pattern that Torquato and his colleagues discovered in the primes is similar to that of quasicrystals and another system called limit-periodic order, but it differs enough that the researchers call it “effectively limit-periodic” order. The prime numbers appear in “self-similar” groupings, meaning that between peaks of certain heights, there are groupings of smaller peaks, and so on.

The team discovered strong indications of such a pattern using computer simulations to see what would happen if prime numbers were treated like a string of atoms subjected to X-rays. In work published in the Journal of Physics A in February, the researchers reported finding a surprising pattern of Bragg-like peaks, indicating that the prime patterns were highly ordered.

The current study uses number theory to provide a theoretical foundation for those previous numerical experiments. The researchers realized that although primes appear random over short intervals, Torquato said, at sufficiently long stretches of the number line, sense can be made out of otherwise seemingly chaotic numbers.

“When you go to that distinguished limit, ‘Boom!’” he said, snapping his fingers. “The ordered structure pops out.”

Journal of Statistical Mechanics: Theory and Experiment – Uncovering multiscale order in the prime numbers via scattering

The prime numbers have been a source of fascination for millennia and continue to surprise us. Motivated by the hyperuniformity concept, which has attracted recent attention in physics and materials science, we show that the prime numbers in certain large intervals possess unanticipated order across length scales and represent the first example of a new class of many-particle systems with pure point diffraction patterns, which we call effectively limit-periodic. In particular, the primes in this regime are hyperuniform. This is shown analytically using the structure factor , proportional to the scattering intensity from a many-particle system. Remarkably, the structure factor of the primes is characterized by dense Bragg peaks, like a quasicrystal, but positioned at certain rational wavenumbers, like a limit-periodic point pattern. However, the primes show an erratic pattern of occupied and unoccupied sites, very different from the predictable patterns of standard limit-periodic systems. We also identify a transition between ordered and disordered prime regimes that depends on the intervals studied. Our analysis leads to an algorithm that enables one to predict primes with high accuracy. Effective limit-periodicity deserves future investigation in physics, independent of its link to the primes

54 thoughts on “Patterns found in Prime Numbers”

  1. …Oh no! Forget the second part. Namely, there are values of x that are not prime that will still get you an integer. However, the first part still holds. The square of every prime number is some multiple of 24, plus one – but, alas, not every multiple of 24, plus one, is the square of a prime number. (955, for instance, is not prime, but fits the formula above. Back to the drawing board on that part.)

  2. There is at least one very simple pattern to the primes, and the matter is not nearly as complex as some of these articles make it out to be.

    Now, perhaps since this following rule does not work for 2 and 3, it is not exhaustive and not considered good math strictly speaking; however, for all other primes, 5,7, 11, 13…as large a prime number as you want, the following holds true:

    The square of a prime number is equal to some multiple of 24, plus one.

    Try it out yourself. p^2=24n+1.
    Or if you want to test any number to see if it is prime plug a value for x into (x^2 – 1)/24. If you get an integer, then the number is prime. Remember, this does not work for 2 and 3.

  3. If it was even roughly accurate, in the regime of prime numbers large enough to be useful in cryptography, then the rough prediction could be used to limit the input set of brute force methods, thus making them much more efficient.

  4. If it was even roughly accurate in the regime of prime numbers large enough to be useful in cryptography then the rough prediction could be used to limit the input set of brute force methods thus making them much more efficient.

  5. There is NO pattern to the primes, but there is a clear, simple, repeating arithmetic pattern to the prime multiples, or composites. If those are removed from the number line, the primes are revealed, by exclusion. This is the method, quartets of 11, 13, 17, 19;; 21, 23, 27, 29;, 31, 33, 37, 39;; 41, 43, 49, etc. If the multiples of 3 are removed, at once we see the primes. Then squaring 7 (p squared, and adding multiples of 2p alternating with 4p, a line is generated leaving the primes up to 121, which is 11 squared. the same 4p and 2p arithmetic progression gives the next prime multiples, which when removed from the quartet line gives the next set of primes, etc. CF: https://jochesh00.wordpress.com/2018/09/15/the-wiggins-prime-sieve-version-3/ This shows why and how the primes are limited to no more than 2 pairs together, and the recurring -9, -1 twin primes, as well. A powerful new tool to investigate the primes and their simplified backbone of the odd primes digits above 10.

  6. There is NO pattern to the primes but there is a clear simple repeating arithmetic pattern to the prime multiples or composites. If those are removed from the number line the primes are revealed by exclusion.This is the method quartets of 11 13 17 19;; 21 23 27 29; 31 33 37 39;; 41 43 49 etc. If the multiples of 3 are removed at once we see the primes. Then squaring 7 (p squared and adding multiples of 2p alternating with 4p a line is generated leaving the primes up to 121 which is 11 squared. the same 4p and 2p arithmetic progression gives the next prime multiples which when removed from the quartet line gives the next set of primes etc.CF: https://jochesh00.wordpress.com/2018/09/15/the-wiggins-prime-sieve-version-3/This shows why and how the primes are limited to no more than 2 pairs together and the recurring -9 -1 twin primes as well. A powerful new tool to investigate the primes and their simplified backbone of the odd primes digits above 10.

  7. There is NO pattern to the primes, but there is a clear, simple, repeating arithmetic pattern to the prime multiples, or composites. If those are removed from the number line, the primes are revealed, by exclusion. This is the method, quartets of 11, 13, 17, 19;; 21, 23, 27, 29;, 31, 33, 37, 39;; 41, 43, 49, etc. If the multiples of 3 are removed, at once we see the primes. Then squaring 7 (p squared, and adding multiples of 2p alternating with 4p, a line is generated leaving the primes up to 121, which is 11 squared. the same 4p and 2p arithmetic progression gives the next prime multiples, which when removed from the quartet line gives the next set of primes, etc. CF: https://jochesh00.wordpress.com/2018/09/15/the-wiggins-prime-sieve-version-3/ This shows why and how the primes are limited to no more than 2 pairs together, and the recurring -9, -1 twin primes, as well. A powerful new tool to investigate the primes and their simplified backbone of the odd primes digits above 10.

  8. There is NO pattern to the primes but there is a clear simple repeating arithmetic pattern to the prime multiples or composites. If those are removed from the number line the primes are revealed by exclusion.This is the method quartets of 11 13 17 19;; 21 23 27 29; 31 33 37 39;; 41 43 49 etc. If the multiples of 3 are removed at once we see the primes. Then squaring 7 (p squared and adding multiples of 2p alternating with 4p a line is generated leaving the primes up to 121 which is 11 squared. the same 4p and 2p arithmetic progression gives the next prime multiples which when removed from the quartet line gives the next set of primes etc.CF: https://jochesh00.wordpress.com/2018/09/15/the-wiggins-prime-sieve-version-3/This shows why and how the primes are limited to no more than 2 pairs together and the recurring -9 -1 twin primes as well. A powerful new tool to investigate the primes and their simplified backbone of the odd primes digits above 10.

  9. There is NO pattern to the primes, but there is a clear, simple, repeating arithmetic pattern to the prime multiples, or composites. If those are removed from the number line, the primes are revealed, by exclusion.

    This is the method, quartets of 11, 13, 17, 19;; 21, 23, 27, 29;, 31, 33, 37, 39;; 41, 43, 49, etc. If the multiples of 3 are removed, at once we see the primes. Then squaring 7 (p squared, and adding multiples of 2p alternating with 4p, a line is generated leaving the primes up to 121, which is 11 squared. the same 4p and 2p arithmetic progression gives the next prime multiples, which when removed from the quartet line gives the next set of primes, etc.
    CF: https://jochesh00.wordpress.com/2018/09/15/the-wiggins-prime-sieve-version-3/

    This shows why and how the primes are limited to no more than 2 pairs together, and the recurring -9, -1 twin primes, as well. A powerful new tool to investigate the primes and their simplified backbone of the odd primes digits above 10.

  10. If it was even roughly accurate, in the regime of prime numbers large enough to be useful in cryptography, then the rough prediction could be used to limit the input set of brute force methods, thus making them much more efficient.

  11. If it was even roughly accurate in the regime of prime numbers large enough to be useful in cryptography then the rough prediction could be used to limit the input set of brute force methods thus making them much more efficient.

  12. If it was even roughly accurate, in the regime of prime numbers large enough to be useful in cryptography, then the rough prediction could be used to limit the input set of brute force methods, thus making them much more efficient.

  13. your wish is my command. Google “visualizing the distribution of primes” at math dot uni dot lu (ie Luxembourg uni, author barthel et al). Primes are “2D” rather than 3-axis. You can see that up to 1 billion numbers in sequence there are just over 50 million primes. The paper also covers Ulam Spirals, which is another great way to visualize primes. Bottom line, primes are not a random walk.

  14. your wish is my command. Google visualizing the distribution of primes”” at math dot uni dot lu (ie Luxembourg uni”””” author barthel et al). Primes are “”””2D”””” rather than 3-axis. You can see that up to 1 billion numbers in sequence there are just over 50 million primes. The paper also covers Ulam Spirals”” which is another great way to visualize primes. Bottom line”” primes are not a random walk.”””

  15. your wish is my command. Google “visualizing the distribution of primes” at math dot uni dot lu (ie Luxembourg uni, author barthel et al). Primes are “2D” rather than 3-axis. You can see that up to 1 billion numbers in sequence there are just over 50 million primes. The paper also covers Ulam Spirals, which is another great way to visualize primes. Bottom line, primes are not a random walk.

  16. your wish is my command. Google visualizing the distribution of primes”” at math dot uni dot lu (ie Luxembourg uni”””” author barthel et al). Primes are “”””2D”””” rather than 3-axis. You can see that up to 1 billion numbers in sequence there are just over 50 million primes. The paper also covers Ulam Spirals”” which is another great way to visualize primes. Bottom line”” primes are not a random walk.”””

  17. I used to wonder if you could map primes into a 2d graph with some spacing algorithm that would allow a visual pattern to emerge you could extrapolate on to find the next ones like a shortcut. The idea seems more plausible in three or even four or more dimensions. Abstractly visualized I sort of imagine one or more >= 3D sphere/elliptical /fractal shape(s) undulating over time or more dimensions. Kind of like a huge differential equation looking for the certain intersections of infinitely spiraling shapes being generated with fundamental patterns. My math is weak so this is probably rather naive but still fun to think about.

  18. I used to wonder if you could map primes into a 2d graph with some spacing algorithm that would allow a visual pattern to emerge you could extrapolate on to find the next ones like a shortcut. The idea seems more plausible in three or even four or more dimensions. Abstractly visualized I sort of imagine one or more >= 3D sphere/elliptical /fractal shape(s) undulating over time or more dimensions. Kind of like a huge differential equation looking for the certain intersections of infinitely spiraling shapes being generated with fundamental patterns. My math is weak so this is probably rather naive but still fun to think about.

  19. I used to wonder if you could map primes into a 2d graph with some spacing algorithm that would allow a visual pattern to emerge you could extrapolate on to find the next ones like a shortcut. The idea seems more plausible in three or even four or more dimensions. Abstractly visualized I sort of imagine one or more >= 3D sphere/elliptical /fractal shape(s) undulating over time or more dimensions. Kind of like a huge differential equation looking for the certain intersections of infinitely spiraling shapes being generated with fundamental patterns. My math is weak so this is probably rather naive but still fun to think about.

  20. I used to wonder if you could map primes into a 2d graph with some spacing algorithm that would allow a visual pattern to emerge you could extrapolate on to find the next ones like a shortcut. The idea seems more plausible in three or even four or more dimensions. Abstractly visualized I sort of imagine one or more >= 3D sphere/elliptical /fractal shape(s) undulating over time or more dimensions. Kind of like a huge differential equation looking for the certain intersections of infinitely spiraling shapes being generated with fundamental patterns. My math is weak so this is probably rather naive but still fun to think about.

  21. No one can honestly argue for a deterministic universe, as making the argument itself assumes minds are undetermined. But then, nobody practices determinism when it comes to their own choices, any more than a fish that doesn’t believe in water could long survive without it.

  22. No one can honestly argue for a deterministic universe as making the argument itself assumes minds are undetermined. But then nobody practices determinism when it comes to their own choices any more than a fish that doesn’t believe in water could long survive without it.

  23. No one can honestly argue for a deterministic universe, as making the argument itself assumes minds are undetermined. But then, nobody practices determinism when it comes to their own choices, any more than a fish that doesn’t believe in water could long survive without it.

  24. No one can honestly argue for a deterministic universe as making the argument itself assumes minds are undetermined. But then nobody practices determinism when it comes to their own choices any more than a fish that doesn’t believe in water could long survive without it.

  25. Namely that it affirms that philosophy. Existence can be understood.” As Einstein remarked, the most unintelligible feature of the universe is that it is intelligible. And as I remark, matter obeys mathematical and logical laws. Also, matter (along with space, time, and energy) came to be from a non-material cause via the Big Bang. Thus, any philosophy which assumes matter is the basis of all reality is utterly at variance with science. And don’t get me started on non-local quantum entanglement! 🙂

  26. Namely that it affirms that philosophy. Existence can be understood.””As Einstein remarked”” the most unintelligible feature of the universe is that it is intelligible. And as I remark matter obeys mathematical and logical laws. Also matter (along with space time and energy) came to be from a non-material cause via the Big Bang. Thus”” any philosophy which assumes matter is the basis of all reality is utterly at variance with science.And don’t get me started on non-local quantum entanglement! :)”””

  27. Namely that it affirms that philosophy. Existence can be understood.” As Einstein remarked, the most unintelligible feature of the universe is that it is intelligible. And as I remark, matter obeys mathematical and logical laws. Also, matter (along with space, time, and energy) came to be from a non-material cause via the Big Bang. Thus, any philosophy which assumes matter is the basis of all reality is utterly at variance with science. And don’t get me started on non-local quantum entanglement! 🙂

  28. Namely that it affirms that philosophy. Existence can be understood.””As Einstein remarked”” the most unintelligible feature of the universe is that it is intelligible. And as I remark matter obeys mathematical and logical laws. Also matter (along with space time and energy) came to be from a non-material cause via the Big Bang. Thus”” any philosophy which assumes matter is the basis of all reality is utterly at variance with science.And don’t get me started on non-local quantum entanglement! :)”””

  29. Perhaps only if this X-ray diffraction / quasicrystal distribution pattern methodology was able to usefully predict prime numbers faster than existing brute force methods.

  30. Perhaps only if this X-ray diffraction / quasicrystal distribution pattern methodology was able to usefully predict prime numbers faster than existing brute force methods.

  31. Perhaps only if this X-ray diffraction / quasicrystal distribution pattern methodology was able to usefully predict prime numbers faster than existing brute force methods.

  32. Perhaps only if this X-ray diffraction / quasicrystal distribution pattern methodology was able to usefully predict prime numbers faster than existing brute force methods.

  33. your wish is my command. Google “visualizing the distribution of primes” at math dot uni dot lu (ie Luxembourg uni, author barthel et al). Primes are “2D” rather than 3-axis. You can see that up to 1 billion numbers in sequence there are just over 50 million primes. The paper also covers Ulam Spirals, which is another great way to visualize primes. Bottom line, primes are not a random walk.

  34. I used to wonder if you could map primes into a 2d graph with some spacing algorithm that would allow a visual pattern to emerge you could extrapolate on to find the next ones like a shortcut. The idea seems more plausible in three or even four or more dimensions. Abstractly visualized I sort of imagine one or more >= 3D sphere/elliptical /fractal shape(s) undulating over time or more dimensions. Kind of like a huge differential equation looking for the certain intersections of infinitely spiraling shapes being generated with fundamental patterns. My math is weak so this is probably rather naive but still fun to think about.

  35. No one can honestly argue for a deterministic universe, as making the argument itself assumes minds are undetermined. But then, nobody practices determinism when it comes to their own choices, any more than a fish that doesn’t believe in water could long survive without it.

  36. “Namely that it affirms that philosophy. Existence can be understood.”

    As Einstein remarked, the most unintelligible feature of the universe is that it is intelligible.

    And as I remark, matter obeys mathematical and logical laws. Also, matter (along with space, time, and energy) came to be from a non-material cause via the Big Bang. Thus, any philosophy which assumes matter is the basis of all reality is utterly at variance with science.

    And don’t get me started on non-local quantum entanglement! 🙂

  37. Once again, abstract numbers & mathematics turn out to be remarkably effective in describing the structure of the material universe. Food for thought, especially for those wedded to materialist philosophy.

  38. Once again abstract numbers & mathematics turn out to be remarkably effective in describing the structure of the material universe. Food for thought especially for those wedded to materialist philosophy.

  39. Perhaps only if this X-ray diffraction / quasicrystal distribution pattern methodology was able to usefully predict prime numbers faster than existing brute force methods.

  40. I like the fact that it is not some base 10 artifact – integers are a fundamental natural thing so maybe there are some really useful things to learn here. Certainly fun to play with (i.e. graph) the primes.

  41. I like the fact that it is not some base 10 artifact – integers are a fundamental natural thing so maybe there are some really useful things to learn here. Certainly fun to play with (i.e. graph) the primes.

  42. Once again, abstract numbers & mathematics turn out to be remarkably effective in describing the structure of the material universe. Food for thought, especially for those wedded to materialist philosophy.

  43. I like the fact that it is not some base 10 artifact – integers are a fundamental natural thing so maybe there are some really useful things to learn here. Certainly fun to play with (i.e. graph) the primes.

Comments are closed.