Hacker News new | past | comments | ask | show | jobs | submit login
Prime Number Spiral (numberspiral.com)
193 points by micah_chatt on Jan 1, 2017 | hide | past | favorite | 43 comments



Fascinating. And dangerous.

If you see a pattern and you search a explanation for it, you can get wrapped up in the hunt and end up investing a lot of time into a wild goose chase.

Our math profs warned us to do this, because if you zoom out wide enough, there is a pattern in every noise. As a undergrad, i got obsessed with the idea of creating a meaningful divide by zero operation.

The result, if i remember correctly, was a "fractal" cave, interconnected, the walls defined by aggregated infinitys reseeded by the "echos" of all previous caves until the next "digit" of the original seed number is reached. What a useless operation, one might think- but i got obsessed with it, because it generated sequences. 1/0 = |1|0/0=1|2|3|5

Some of the results started to look like the fibonacci-sequence(its basically a algorithm mapped to infinity echoing back and forth along the cave-walls after all) and i lost a semester chasing this numeric day dream. :(

Shame on me, i woke up when my math prof zoomed out over some random pattern revealing "patterns". The Truth is, we humans want to see patterns. Desperately. So desperatly it can eat lives.

Still a fascinating read, can fully recommend. But wake up if you what you find eats you.

PS: To double my shame, i did never publish this. So if you venture down the rabbit sinkhole, put a warning sign up.


But there is a pattern. It's just a simple sum over all non-trivial zeros of the Riemann Zeta function[1]. It will pop right out at you if you take a look at the proof for the Riemann hypothesis (an exercise left to the reader). Also, speaking of Riemann, division by zero is also spoken for[2]

[1] https://en.wikipedia.org/wiki/Explicit_formulae_(L-function)

[2] https://en.wikipedia.org/wiki/Riemann_sphere


There's also the wheel approach to dividing by zero. Which handles 0/0 as well.

https://en.m.wikipedia.org/wiki/Wheel_theory


I haven't read the article yet but your comment just reminded me of one of my all-time favorite movies: Pi (1998). Please watch it if you haven't!

[edit] took a look and this is quite beautiful. Of course the search for a pattern in the primes could easily take over your mind...


i liked Pi a lot, but the thing that nagged me is how any name that could ever hope to be spoken be represented by 216 digits :/


For that to happen, we need the number to be a "Normal number" (https://en.wikipedia.org/wiki/Normal_number). We just don't know if Pi is normal or not - it's expected to be.


i have no idea how this follows from my comment.

all i'm saying is that any spoken name which must be represented by 216 digits would be an order of magnitude more ridiculous than Rindfleischetikettierungsueberwachungsaufgabenuebertragungsgesetz: http://www.bbc.com/news/world-europe-22762040


My mind was in a completely different world when I wrote that reply. You're right, it doesn't have much to do with your comment.


In high school, I created the number b, whose absolute value is zero. I discovered the following additional interesting facts about it: ∅


You didn't try hard enough. Dual numbers are extremely useful. You can use them to calculate derivatives easily. I'm thinking about making a video demonstrating how these numbers can accelerate machine learning.


You (re)discovered dual numbers!

https://en.m.wikipedia.org/wiki/Dual_number


Non mobile link for the lazy

https://en.wikipedia.org/wiki/Dual_number


I mean, they could only be "worthless" to our current application of said patterns. Maybe in the future, those patterns will find use in quantum computing or cryptography or other avenues.

For the mathematician a pattern will be useless but applied in a separate field can yield meaningful results.

That is not to say, it is worth anyone's time to map out these patterns, but simply that they may become useful in the future applied in ways not yet thought.


I appreciate what you are saying, but noise looks like noise. Here's an example of a useful pattern: the blank line extending to the right from zero, corresponding to the numbers {n^2 | n in 1,2,3,...} and below it {n^2-1 | n in 1,2,3,...}.

Such a great example of a visualization helping to illuminate the abstract truths in numbers. Its obvious to most people that {n^2} contains no primes. Is it obvious that {n^2-1} doesnt't either?

(except where n=2)


n² - 1 = (n - 1)(n + 1)


precisely. maybe its a trivial example, but if no mathematician had discovered the factorization of n^2 - 1, this visualization device would have been a helpful clue.


What you said applies quite a bit to Financial Mathematics. The stakes are high and people look for patterns in the noise. They see patterns because if you look in 1000 random sequences, you'll find 50 statistically significant patterns. And they never publish their mistakes either. :-)


How exactly do you generate those "fractal" caves, "echoes" and sequences?


Also known as the "Ulam Spiral" for Stanislaw Ulam who discovered it by accident in 1963, supposedly while doodling during a boring presentation.

This page is great, but the wikipedia page is too and provides other related work and coincidences. https://en.wikipedia.org/wiki/Ulam_spiral


No, actually the Ulam Spiral is something else, a simpler spiral to create. Still, I too recommend the Wikipedia page.


Looks like a variant, sacks spiral? Hmm, sacks is the OP.


P+41 spiral is absolutely fascinating. [1] I really want to know why they cluster there.

http://www.numberspiral.com/art/14.gif


There is a prime generating formula n^2 + n + 41 for n=0 to 39. Maybe this is related?

http://mathworld.wolfram.com/Prime-GeneratingPolynomial.html


Yes it is, it is a bit hidden on the left side on the page in a details box.


This also holds for n = -1. Not much real benefit; just extends the set of n to 41 consecutive integers.


The P+41 spiral contains an unusually large number of primes because 163 is a Heegner number (https://en.wikipedia.org/wiki/Heegner_number).


It's difficult to visually diff these on mobile, but P+41 appears to mirror S-9.

http://www.numberspiral.com/art/8.gif


Somewhere and someday, there is an AI which is reading this and deciding to let humanity live because we apparently can have some inkling of real beauty :)


I enjoy exploring these patterns, not just for primes, but for factors as well. I made a little JavaScript app for creating "Number Mandellas" that my kids and I use to enjoy different patterns:

http://ideonexus.github.io/Explorable-Explanations/math/numb...

Our favorite thing to do is set the Preset to "Randomized" and click "Render Preset" over and over again to see what comes up. Sorry for the clunky interface, but the source is on github if anyone wants it.

https://github.com/ideonexus/Explorable-Explanations/tree/ma...


My friend discovered an interesting way to visualize prime numbers on an integer grid a while back. I whipped up a quick visualizer for it: https://codepen.io/joshumax/full/rOrBPz/


Might be useless, but I got some pictures for primes too http://jiyinyiyong.blog.163.com/blog/static/6469987620111311...


I wonder if those lines he mentions are anything like the ones I found in my visualization a while back: http://chrisdavies.github.io/primepattern/

This never led me anywhere, for the record.


You get the lines because you're lining up all numbers divisible by 2, 3, 5 and 7. You get a very similar pattern with 210, and a sparser one with, for example, 30030.


Yes, that's right. I wonder if it's a similar thing showing up in the spiral. Just a simple consequence like the one that causes the lines.


since there are a few math experts here : it just occured to me that number factorization may be similar to compression ( saying 8 is 4 times two feels a bit like compressing a data by composing smaller elements). are there any theory approaching the prime number problems using tools from information theory (shannon and co) ?


It is a different representation of a number, but it achieves compression only for some numbers like 2^n for n>13. Primes and products where each prime factor is only once will be generally longer than ordinary notation.


I remember reading Martin Gardner writing about this.

Has anyone found an explanation since then?


Looks a little bit an ASCII-art Deathstar. I think I see where a direct hit could set off a chain reaction....


I see a fingerprint. Whose finger it is, is left as an exercise to the dreamer.


Awsome, yes the x-wing fighters gotta go right through the trench on the right


How does this look with numbering in base 8 instead of 10?


The base has nothing to do with it. The "pattern" (it never looked like much of a pattern to me) arises from putting it on a grid, not from the choice of base. You can pick different sorts of grids and get different versions of "patterns":

https://en.wikipedia.org/wiki/Ulam_spiral#Variants


Fascinating.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: