Live data from Hacker News

An Interesting Pattern in the Prime Numbers: Parallax Compression

novaspivack.com

141–150 of 195 posts

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#141

Earlier quoted context omitted.

> All others are multiples of 1 and 5. Assuming you used “and” when you meant “or”, that's trivially true (and redundant) in that all numbers (irrespective of base, which has no effect on this) are integer multiples of 1. But no primes other than 5 are integer multiples of 5, in any base.

> Senary may be considered interesting in the study of prime numbers, since all primes other than 2 and 3, when expressed in senary, have 1 or 5 as the final digit. https://en.wikipedia.org/wiki/Senary I expressed it poorly, but not as you state, incorrectly.

> I expressed it poorly, but not as you state, incorrectly.

No, really, it is completely incorrect to use “multiple of X in base Y” to mean “have X as the final digit in base Y” (which is equivalent to “is congruent to X modulo Y.”)

13 is not, in base 10 (or anywhere else), a multiple of 3.[0]

That's just not what “multiple” means.

[0] Well, the number denoted by the digits “13” in any base that is itself a multiple of 3—other than base 3 itself where “13” is not a valid number—is a multiple of 3, obviously, but we're talking about the number represented by “13” in base 10.

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#142

Earlier quoted context omitted.

> All others are multiples of 1 and 5. Assuming you used “and” when you meant “or”, that's trivially true (and redundant) in that all numbers (irrespective of base, which has no effect on this) are integer multiples of 1. But no primes other than 5 are integer multiples of 5, in any base.

> Senary may be considered interesting in the study of prime numbers, since all primes other than 2 and 3, when expressed in senary, have 1 or 5 as the final digit. https://en.wikipedia.org/wiki/Senary I expressed it poorly, but not as you state, incorrectly.

Having x as a final digit does not make a number a multiple of x. For example, 13 is not a multiple of 3 in base 10.

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#143

The drawing is incorrect. More specifically, it’s a drawing of OEIS A054521 (black if gcd(row, col) == 1, red otherwise), not of the parallax compressed primes. The two drawings do not match as claimed. The first place where they differ is row 9, column 1, which is drawn as black even though none of 217, 226, 235, 244, 253, 262 are prime. It’s clear that gcd(row, col) == 1 is a necessary condition for there to be any…

Their picture is correct, but only because they are doing something more ridiculous than this. Every one of the squares in their picture represents 75 numbers, not 5 numbers.

UPDATE:

Thanks to comments from readers we have found that the pattern does not exactly match the GCD triangle for some values of the number of cells and rows.

This possibly makes it a more interesting finding. But it also means we can’t use GCD to render it quickly for all values.

In the code on Observable we were using GCD as a shortcut to render it because it saved time compared the earlier approach. However readers correctly pointed out that the rendering was not always correct using GCD.

Now that we know GCD doesn’t apply to all values of n, we are reverting to the original code, which generates the correct renderings for all values - but is slower - and there will be an update on Observable soon.

Meanwhile - to see the original code at work, and test it out for any value yourself, here is the Mathematica notebook code:

Https://GitHub.com/shaunxcode/a-pattern-in-the-primes

The Observable JavaScript code is being updated soon to account for this.

Join the discussion in the Telegram group as well - details below.

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#144

Earlier quoted context omitted.

Keep going! Don't forget: There's nothing bad about no-response - People are much more likely to respond on the web and email when you're wrong. ;)

> There's nothing bad about no-response - People are much more likely to respond on the web and email when you're wrong. ;) There certainly could be something bad about no-response. As someone in academia who gets uninformed musings or crackpot theories from laypeople in his mailbox from time to time, no-response basically means “I know you are wrong, seriously wrong (and, in many crackpot cases, probably mentally il…

As someone else in academia who gets his share of crackpot emails, no response can also mean "oh god, I don't have time to think about this when I have 1000 other emails from my students and colleagues".

(I'm particularly horrid at email.). So I wouldn't take it personally.

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#145

This made me curious, so I wrote a javascript version that renders a larger image of it: http://www.gibney.de/parallax_primes

I really liked your approach. I made a few modifications.

http://htmlpreview.github.io/?https://github.com/acmegeek/pr...

I changed it to render with circles vs squares, and have them stack nicely. Also, have the variables more isolated to test. Also, it counts how many primes are within a pack, and assigns the color proportionately. This is still a work in progress.

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#146

The drawing is incorrect. More specifically, it’s a drawing of OEIS A054521 (black if gcd(row, col) == 1, red otherwise), not of the parallax compressed primes. The two drawings do not match as claimed. The first place where they differ is row 9, column 1, which is drawn as black even though none of 217, 226, 235, 244, 253, 262 are prime. It’s clear that gcd(row, col) == 1 is a necessary condition for there to be any…

The rendering was for n=74 in fact, not for n=75. The pattern does seem to recur for even numbered n values and for those we think it matches GCD (where cells contain an even number of integers, and we render for the same even number of rows). But this has not been proved yet. However when n has odd values, the pattern does not always match GCD, it turns out. This is interesting and means that it may be a less “trivial” pattern in fact.

See the Mathematica notebook, which correctly renders it for any value.

Https://GitHub.com/shaunxcode/a-pattern-in-the-primes

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#147
post #4

The pattern looks nice, but I would have asked some mathematicians before announcing this as something novel.

"The initial goal of John Conway was to define an interesting and unpredictable cell automaton....

"While the definitions before Conway's LIFE were proof-oriented, Conway's construction simply aimed at simplicity without a priori aiming at the proof of automaton being alive." https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#148
The way the numbers are picked into the 75-number groups is responsible for pretty symmetry.

If you replace condition isPrime() with simpler checks: "is not divisible by 2" "is not divisible by 2 and 3" .. "... by 2, 3 and 5" .... "... by 2,3,5,7,13,17 and 23" ... you'll get more and more complex images but still symmetrical.

For me the whole thing is subtle hiding of messiness of primes into the strong, pretty, symmetrical shape which obscures the mess and just gets richer and more artistic due to that.

Experiment with the code provided by user no_gravity here: http://www.gibney.de/parallax_primes

By changing the contents of isPrime() function you can see how you get fooled into thinking there's order in primes by mixing messiness of primes into the order of number picking scheme.

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#149
post #73

Earlier quoted context omitted.

The claim is that using N numbers per square will result in the pattern holding for N rows, for arbitrarily large N.

Even if I’m misunderstanding how this is supposed to work for odd n, this claim fails for plenty of even n. n = 14: fails on row 13, col 3 n = 20: fails on row 17, col 8 n = 30: fails on row 17, col 7 n = 38: fails on row 37, col 8 n = 44: fails on row 31, col 2 n = 50: fails on row 43, col 13 …

Here is the code on GitHub - it renders it correctly and addresses the issues. Https://GitHub.com/shaunxcode/a-pattern-in-the-primes

Re: An Interesting Pattern in the Prime Numbers: Parallax Compression

#150
post #45

> on January 18, 2018, I found a numerical sequence that generated the exact same pattern as Shaun’s pattern Does this mean that we have a sort of bloom filter-esque test for primality? (ie, it will give you a guaranteed no in O(1) but you'll have to crunch numbers to get the yes?) If so, are there implications for things that want to know "is it prime?" quickly? Crpytography comes to mind, for instance...

We already have quick algorithms that say "is it prime" with certainty. Reducing the required time from O(log^6(n)) to O(1) isn't particularly important from cryptographic point of view. https://en.wikipedia.org/wiki/Primality_test#Fast_determinis...

we do not have a fast, certain, algorithm for large numbers. The only thing we have for large numbers is “it’s probably a prime. if it’s of a special form, such as messenne, use this other algorithm that takes like 10 days to confirm whether it is actually a prime. If it’s not a number of a special form for which we have specialized algorithms for, which are still pretty slow for large numbers, well you’re SOL, and if you really want to know for certain if it’s a prime or not you better use one of the clever brute force algorithms that do things like only check odds and only check up until the square root of a probable prime, and are still slow as all get out”

So speed improvements are welcome for academic use. Although this doesn’t look like it’s a game changer.

Post reply on HN