by mg · 1y ago · 0 comments
You look at integers in "packs" of 100. If a pack contains a prime number, you color it black, otherwise you color it red.
The first pack contains 100 consecutive integers. The second every second integer. The third every third integer and so on.
Every pack starts where the last one stopped.
On the first row, you draw 1 pack, on the second 2, on the third 3 and so on:
https://www.gibney.org/parallax_primes
It looks like hieroglyphs from another universe.
I'm still not sure why it looks the way it looks.
If you want to compare it to a random distribution, you can change this line:
if (isPrime(myNum)) return 1;
To this: if (Math.random()>0.99) return 1;
Very different. I wonder where the symmetry and all the other properties of the pattern come from when using primes.It's effectively a visualization of gcd(x,y), and has almost nothing to do with primes. Once you realize that, it's a lot easier to reason about a lot of the patterns, although it is still a pretty interesting visualization.
Thanks for the link!
With this in mind, the seeming patterns of the figure you link to are explained by https://news.ycombinator.com/item?id=17106193
This parallax primes thing though led to the linked page [1] which has lots of background and other connections, including the most satisfying part, which turned out more geometric [2]
[0] https://en.wikipedia.org/wiki/Ulam_spiral#Explanation [1] https://www.novaspivack.com/science/we-have-discovered-a-new... [2] https://www.cut-the-knot.org/Curriculum/Arithmetic/PrimesFro...
Okay so if you iterate only even or odd packings the pattern actually converges, which is crazy!
It repeats like this predictably. Even though it changes, the way in which it changes is also predictable. Their repetition and predictability make prime numbers a pattern.
Out of the fundamental pattern of prime numbers, higher-level patterns also appear, and studying these patterns is a whole branch of math. You can find all kinds of visualizations of these patterns, including ones linked in this thread.
It's not that you're seeing a pattern that's not there, it's that you're seeing a pattern that gradually becomes infinitely complex.
These patterns were documented and well understood starting in BC times by Erasthosenes and learning them as part of prime number theory is a 101 course in tertiary maths education. So it's really really weird for anyone to say "there's no patterns". There are and they are extremely well understood and known.
Here's a simple pattern; All prime numbers above 2 are odd. Well duh right? Otherwise they'd be a multiple of 2, not prime.
Well let's extend this. All prime numbers above 6 are of the form 6n + 1 or 6n +5. Otherwise they'd be a multiple of 2 or 3.
Once more; All prime numbers above 30 are of the form 30n + one of [1,7,11,13,17,19,23,29]. Anything else would be a multiple of 2,3 or 5. You can extend this forever. Note each time we do this we're reducing how many numbers could possibly be prime. From 1/2 to 2/6 to 8/30 numbers possibly being prime. Keep going with this and you'll converge to the prime counting function.
Basically whenever you have a composite number there's well understood periodic gaps in primality. People understand this more intuitively for base 10 where anything ending in 0,2,4,6,8 is a multiple of 2 and anything ending in 0,5 is a multiple of 5 hence you only get primes ending in 1,3,7,9 when writing in base 10 but this idea works for any composite number. This leads to the extremely well known and well understood patterns you get when you graph primes in various ways.