Did you know this about prime numbers?

The author of the following site:

http://fdonea.tripod.com/primes.htm

says that, as far as he knows, no one can “explain the occurance of straight lines in an otherwise apparently random pattern.” I’ll bet someone here can!

My thoughts:

  1. Is the occurance prime numbers truly random? It would seem to me that numbers that cannot end with the digits 2, 4, 5, 6, or 8 would rule out prime numbers as a random sequence. Perhaps he is referring to the fact that there is no formula which can unerringly create prime numbers.

  2. By embedding prime numbers in a spiral pattern, one is imposing a pattern on a random occurance.

  3. It is not uncommon for patterns to occur in random sequences. Perhaps it would be more surprising if the straight lines didn’t occur.

I think I am on the right track here, but I lack the knowledge of mathematics to express myself better. Surely someone here can explain this.

At the risk of looking like an ignoramus, why would a truly random sequence[sup]1[/sup] have a pattern?

[sup]1[/sup] [sub]I understand how any “random” sequence you may generate might have a pattern. But a truly random sequence, which may be impossible to produce, shouldn’t have a pattern…[/sub]

I’d like to examine a set of the numbers that appear in one of the lines; it may be that they are all of a similar type…

What’s with the empty square in the middle of the spiral. If I were going to make a spiral of numbers I wouldn’t leave one square inexplicably blank. I wonder what the large spiral would look like without it.

See here . Chaos was a wonderful book and will help heal the mind of those who venture down that road… :slight_smile:

The only patterns that ‘exist’ in random sets are those that arise by chance (flipping three consecutive heads, then three consecutive tails, then three consecutive heads again) and those that arise purely as a result of our perception (clouds that look like ducks etc)

Some information is to be found here, here, and here

The occurence of prime numbers is not random in one sense, because I can write a finite-length computer program that will print out all of them.

However, given all of the first n prime numbers, I can’t predict with any accuracy what the next one will be. That’s what they mean here.

Points 2 and 3 from the OP are valid.

One factor seems to apply, which might be a factor in the pattern. Diagonal lines seems to be all either odd, or all even. In other words, the odd and even numbers are like on a chessboard, with even numbers being black squares, and odd numbers being white squares (or vice versa). This seems to apply up to 71 (I’ve done it on excel).

If this is true, then it means you can only have diagonal lines, as only odd numbers can be prime (apart from 2). Therefore, it means you would get patterns, that might not be there otherwise. It might be interesting to plot a spiral of only odd numbers, to see how that changes things.

I think the odd/even rule applies for the following reason. If you are forming the spiral, if you go one step ahead you would be moving to a square of a different colour on a chessboard (moving one square from your current square), and changing between odd and even numbers.

In that case if you started with a 1 on a white square, you would then move one square for the 2 on a black square, then onto a white square for the 3, black for 4, etc, so odds whould be white, and blacks even.

Points 2 and 3 are not valid. While the spiral is imposing an order, it is the nature of random sequences that nothing you do will order them. That is no systematic procedure will impose any order on them. And while some patterns will occur by chance in any random pattern, they will be rare and not like those straight lines. Now it is perfectly clear that the primes are not random; they only appear random. What those straight lines mean (note that are all at 45 and -45 degrees, which would not be expected from random patterns appearing, which would happen at random angles insofar as they appeared at all) is that certain quadratic sequences have far more primes than expected and others far fewer. This is in stark contrast to the situation of linear sequences. That is, if we pick a number a, then for all numbers b that have no divisor in common with a, all the sequences of the form ax + b with x varying, have about the same number of primes (asymptotically, the density of primes in all those sequences is the same). But those straight lines, unless they disappear when you continue it for large n (which no one expects) imply that the analgous result for quadratic sequences (of the form ax^2 + bx + c) is very different. And that was totally unexpected and no one has found a good explanation.

All right, I looked at the site in the OP (I was busy earlier). There’s absolutely nothing in there that makes me think there’s anything other than pure randomness at work.

Have you SEEN a pattern of purely random dots? It looks nothing like that.

Generate enough patterns of purely random dots, and with all probability, you’ll see something with far more structure to it. That’s the nature of randomness: you expect large chunks of order from time to time.

Point 1 of the OP is valid - the second part of it.

(Incidentally, when the author of the site drew the larger pictures, the ‘1’ spot became a prime - whoops).

The way the spiral is constructed, after the second ring, each successive ‘ring’ of the spiral has 8 more numbers than the previos - the first ‘ring’ is the number 1, the second is the numbers 2-9, the third is 10-26, the fourth is 27-51, and so on.
That ensures that any diagonal line will hit all odd numbers or all even numbers.

The way it’s constructed, too, the ‘strongest’ 2 diagonal lines emanating from 5 contain mostly 3’s, 7’s, and 1’s in their ones digit, for quite a while.

I’ve been screwing around for the past hour and I think I’ve found something. Try coloring in every square ending in 1, 3, 7, or 9. Drop out all the multiples of 3. You get a very striking pattern. Moreover, I did this and then randomly deleted points until I got the right density. (I was using a 100 x 100 grid and so tried for 1229 points.) Frankly the thing looks about as significant to me as the one based on primes. What’s happening is the basic pattern is still somewhat visible, even after a lot of points are removed.

This is just a novel way of plotting graphs; the lines exist because there are formulae (like Euler’s) that generate a high proportion of primes; the reason that the lines are not solid is that the formulae (like Euler’s) don’t generate primes for every input value.

Does the ostensible pattern have anything to do with Ramsey’s Theorem? Is this just an example of it ‘in action’?

From here. Ha! I recommend Q.E.D.'s links, BTW.

Ramsey’s theorem deals with graph theory, so if it does have anything to do with this, it’s a very subtle connection.

This phenomenon has nothing to do with Ramsey’s theorem. And if anyone thinks a random collection of numbers with the same average distribution of primes will produce such patterns, I would sure like to see it. There are sources of random numbers, although they are usually random digits, but you could use them to add to a list of primes to get the right average distribution.

BTW, not only does the pattern persist when you plot a larger number of primes, it even grows more striking. Mangetout has it right. The formulas that are satisfied by these lines (specifically certain quadratic formulas) contain many more primes than expected and other such formulas far fewer and there is no known explantion for this. Whatever it is, it is not random.

And yes, Ulam discovered it doodling during a boring lecture. I have made a number of discoveries in that way, noting so striking. On one occasion, I reduced the proof the lecturer was presenting from a dozen pages to a few lines.