|
|
Strange Prime number pattern
Hi everyone. This is my first post so I hope this is the right place. I started a project in 1993 with prime numbers and recently picked it back up. The first time I did this I worked in QBasic. Now I'm doing it in Python. I'm only a hobbyist in programing and math, so I'd like to see if someone with more knowledge than me in both can let me know if I've found something new or if I'm just seeing a side effect of known properties of primes.
Here are the steps to my findings.
1. Take a list of prime numbers starting at 3
(3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61...)
2. Make a list of the differences between on number and the next.
3 -> 5 = 2 5 -> 7 = 2 ...
(2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6 ...)
3. Note the pair of 2s and 6s, but no pair of 4s
I noticed this in 1993 but the numbers I was working in had to stay in the tens of thousands and thus my hunch had no "proof".
I tried various ways of graphing this and found a pattern of "holes" missing from the gaps between primes. I was told this was just a side effect of sieve of eratosthenes, but the pattern is so regular and predictable that I wanted to find out more about it.
I'm not a mathematician nor a programmer, just a very curious person. So I'd love to find out more, but worry I might not understand the answer. If anyone is patient and curious, I'd love to share my findings and see what can be discovered.
Thanks in advance.
Re: Strange Prime number pattern
You won't ever have a pair of 4's in a row. Let's say X is a prime number. We know it's odd as they all are except for 2. Every odd number is going to be either:
A) divisible by 3 (x mod 3 = 0); B) have a remainder of 1 when divided by 3 (x mod 3 = 1); C) have a remainder of 2 when divided by 3 (x mod 3 = 2).
Let's consider X, X+4 and X + 8 when X is prime:
A) X is divisible by 3 - can't happen when X is prime B) X mod 3 = 1 Then (X+4) mod 3 = 2 and (X+8) mod 3 = 0. Therefore X+8 is divisible by 3 and is not prime. C) X mod 3 = 2 Then (X+4) mod 3 = 0 Therefore X+4 is divisible by 3 and is not prime.
So for any prime number X, either X+4 or X+8 will be divisible by 3.
Re: Strange Prime number pattern
Thanks Pi man. The rest of the pattern (of non-pairs) is 4,16,28,...(intervals of 12) and 8,20,32,... (also intervals of 12). These all seem to follow what you've described.
I'm running this into the millions for the first time with python and glad to know what they show. I'll post some pictures when I can.
- MathsIsFun
- Administrator

Re: Strange Prime number pattern
Excellent first post, Blueman, and welcome to the forum.
Primes are so fascinating, and useful too.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Re: Strange Prime number pattern
Indeed they are. I think pi man's proof can be applied to any even number that isn't a multiple of 3, so as well as the numbers you've mentioned, you also won't find any pairs of 10, 22, 34... (in intervals of 12) or 14, 26, 38... (in intervals of 12).
You also won't find any pairs of 2 apart from the pair that start off the sequence. pi man's proof still works there, and the pair of 2's exists because they describe the differences between 3, 5, 7. pi man's proof says that one of those is a multiple of 3, which 3 is, but it is also prime.
Incidentally, whenever you see a 2 in that sequence of differences, it means that you've found a pair of twin primes (two consecutive odd numbers that are both prime). No one knows whether the twin primes go on for infinity or not. There's probably a vastly huge sum of money being offered somewhere for anyone who can prove either way whether they do.
Anyway, a very warm welcome to the forum. Have lots of fun here.
Last edited by mathsyperson (2007-01-02 05:28:00)
Why did the vector cross the road? It wanted to be normal.
- Toast
- Real Member

Re: Strange Prime number pattern
Why yes, quite an interesting proof pi man 
Re: Strange Prime number pattern
...Ooops. It's a shame this forum doesn't have an embarassment smilie. 
Why did the vector cross the road? It wanted to be normal.
- krassi_holmz
- Real Member

Re: Strange Prime number pattern
Hi Blueman. I like your first post too.
IPBLE: Increasing Performance By Lowering Expectations.
Re: Strange Prime number pattern
I've always been fascinated with primes. There's got to be some sort of pattern in there somewhere. Many, many, years ago I tried using different bases (binary, hex, etc.) to see if any patterns jumped out. Then the use of the internet began to growth quickly and I discovered that primes were fascinating to many. Brilliant minds have spent countless hours on this and I realized that finding a pattern is not going to be as simple as me converting the numbers to a different power-based system.
I still think that a completely different numbering system might be the answer. For example, instead of a power-based system, how about a prime-based system? So instead of expressing a number in ones, tens and hundreds..., express them in terms of 2's, 3's, 5's, 7's, etc.
Decimal PrimeBased 0 0 1 1 2 10 3 100 4 20 5 1000 6 110 7 10000 8 30 9 200 10 1010 11 100000 12 120
Basically this numbering system is expressing the prime factorization in a numeric form. From right to left, the columns are the prime numbers: 1, 2, 3, 5, 7, 11. So 6 in this system (3^1) * (2^1) * (1^0). 12 is (3^1) * (2^2) * (1^0). This system has not helped much and it has its flaws. Although the columns are prime-based, the actual digits are decimal. So 4 is represented as 20 but "2" in this system is 10. So 4 should really be 10\0 with a "" separating the digits. Make any sense?
I would like to write more but our New Year's guests have arrived. Happy New Year's to all you mathematicians!
Last edited by pi man (2007-01-02 16:11:57)
- krassi_holmz
- Real Member

Re: Strange Prime number pattern
Happy new year (january, 2, 18:20)! The prime are really disorsered. As pi man said "Brilliant minds have spent countless hours on this ..." I either don't think some pattern ever exists. I may be wrong, but changing the base may help in some cases, but it's a special case of the number theory with congurents. I think the prime numbers should have some fractal properties, in some system, not the usual, but based on another mathematical rule. For example, there's a theorem (which I rediscovered before knowing it's been already discovered), saying that every integer can be represented in an unique way as a sum of non-succesive numbers of Fibonacci. I think this, because of some requrrent definitions and properties of the prime numbers, such as the Erastrotenes sieve. And another - I don't think that many of the results will be computer-generated. For a theorem to be proved, it isn't sufficient to be true for numbers up to a million, nor up to 10^million. You need a proof. Nowadays, there are some very interesting results about prime numbers, involving contemporary mathematics, such as integrals, fields, modular functions. Every "spheres" of maths are connected. I like the analytical number theory, but i don't understand not a bit of it. And there are some general unsolved hypotesis, which, when proved, will have general consequenses to all fields in mathematics. Some of the most popular are the Riemann's hypothesis and ABC conjecture. I think we haven't mathematically "grown" enough to understand all the proprties of the prime numbers. But I think that some day we will. And I hope to be soon.
IPBLE: Increasing Performance By Lowering Expectations.
Re: Strange Prime number pattern
Regarding prime pairs. There is a way to plot this info in 2D that makes that prime pairs visible.
Take the list of differences (2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6 ...) and plot them (n1,n2) (n3, n4) basically take each pair and turn them into coordinates.
This will show that not only do prime pairs (primes 2 aparts) continue to happen over and over, but so do many other combinations (minus certain holes). These holes in the scatter graph that forms are very constant as the graph fills.
You can also start "late" in the sequence and find it fills in both directions.
It's as if to say "all distances between primes exists at all sizes" minus of course the holes I originally posted about. I have images, is there a way I could post them?
In a scary form of ascii art, here is the pattern as it seems to fall, all odd spaces are removed so this grid represents even numbers only with the origin in the lower left.
The actual scatter graph looks more like this....
Aha! Posted image as my avatar!
Last edited by BluemanSteele (2007-01-03 22:23:03)
- krassi_holmz
- Real Member

Re: Strange Prime number pattern
Intersting. There's a conjecture, that for every even n, there exists infinitely many prime couples (p,q), such that p-q=n. Intersting pattern. Does your avatar has some connection with this? I like it very much.
You can upload images, using "upload image", when you're posting and using the tag. Something like:
You can also read the forum features.
Last edited by krassi_holmz (2007-01-04 03:33:58)
IPBLE: Increasing Performance By Lowering Expectations.
Re: Strange Prime number pattern
Ok I've figured out how to post images, I'll edit this post and put up a more interesting one. While this post is up, the picture below is much like my avatar but color and height coded to show repeated "hits" on that spot.
Higher and brighter = more repetition.
Last edited by BluemanSteele (2007-01-04 04:03:01)
Re: Strange Prime number pattern
krassi_holmz wrote:Intersting. There's a conjecture, that for every even n, there exists infinitely many prime couples (p,q), such that p-q=n. Intersting pattern. Does your avatar has some connection with this?
My avatar and the now posted image show prime couples everywhere that one of the coordinates is 2.
Since the origin is at the bottom left, the left and bottom most sides of the image represent (2,x) and (x,2) of the coordinate system.
This pattern has always grown in this way and would really love to see it pushed into the billions if possible (my avatar shows about 80,000 primes or the primes from 3 to 1 million). I know it's not a 'proof' but it's an interesting map to show new pairs of all sorts consistently growing.
Are there any interested C programmers who could take pseudo code and optimize it?
Last edited by BluemanSteele (2007-01-04 08:44:37)
- Ricky
- Moderator

Re: Strange Prime number pattern
Are there any interested C programmers who could take pseudo code and optimize it?
Yep. I'd be one of those.
"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."
- krassi_holmz
- Real Member

Re: Strange Prime number pattern
Are there any interested C programmers who could take pseudo code and optimize it?
And I cna use Mathematica for some big primes.
IPBLE: Increasing Performance By Lowering Expectations.
Re: Strange Prime number pattern
Great to hear Ricky!
I'm going to describe it similar to text processing. I'm sure there is a much more efficient way to do it, but this will be easier to describe. My algorithms are less than text-book quality so I'll leave them out. This is a bit of a repeat from above but I'll post it that way for clarity.
1. Create (or read from) a list of prime numbers starting at 3
(3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61...)
2. Make a list of the differences between on number and the next.
3 -> 5 = 2 5 -> 7 = 2 ...
(2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6 ...)
3. Take the first two numbers in the list (n1 and n2) and plot them as coordinates.
4. Do the same for either a. (n3 and n4) or b. (n2 and n3), I've found both produce interesting results.
That is take... (2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2)
And plot points (2,2) (4,2) (4,2) (4,6) (2,6) (4,2)
OR. plot to points (2,2) (2,4) (4,2) (2,4) (4,2) (2,4) (4,6) (6,2) (2,6) (6,4) (4,2)
5. Since all numbers are even,optionally divide all numbers by two to collapse the resulting shape of negative empty areas.
Let me know if you have any questions if I have not been clear. I'd post my Python but eek do I have to show the world what a horrible coder I am??? :-)
- krassi_holmz
- Real Member

Re: Strange Prime number pattern
Here are two plots, made them with mathematica. The first is for all numbers to the 100000th prime number (not 100000)! The second - to 1000000th prime number:
Last edited by krassi_holmz (2007-01-04 11:51:04)
IPBLE: Increasing Performance By Lowering Expectations.
- krassi_holmz
- Real Member

Re: Strange Prime number pattern
BluemanSteele wrote:Great to hear Ricky!
I'm going to describe it similar to text processing. I'm sure there is a much more efficient way to do it, but this will be easier to describe. My algorithms are less than text-book quality so I'll leave them out. This is a bit of a repeat from above but I'll post it that way for clarity.
1. Create (or read from) a list of prime numbers starting at 3
(3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61...)
2. Make a list of the differences between on number and the next.
3 -> 5 = 2 5 -> 7 = 2 ...
(2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6 ...)
3. Take the first two numbers in the list (n1 and n2) and plot them as coordinates.
4. Do the same for either a. (n3 and n4) or b. (n2 and n3), I've found both produce interesting results.
That is take... (2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2)
And plot points (2,2) (4,2) (4,2) (4,6) (2,6) (4,2)
OR. plot to points (2,2) (2,4) (4,2) (2,4) (4,2) (2,4) (4,6) (6,2) (2,6) (6,4) (4,2)
5. Since all numbers are even,optionally divide all numbers by two to collapse the resulting shape of negative empty areas.
Let me know if you have any questions if I have not been clear. I'd post my Python but eek do I have to show the world what a horrible coder I am??? :-)
I made the same. Only for optimisation: there are many "fast" tests for finding the next prime. I recommend you download some library for computing primes, instead of computing them using Erastritenes' sieve of brute force. That will save much time for big primes.
IPBLE: Increasing Performance By Lowering Expectations.
Re: Strange Prime number pattern
Thanks! Those look great.
I think we can see the pattern, for lack of a better word, want to continue. However, is there anyway to turn this visual pattern into a proof?
- krassi_holmz
- Real Member

Re: Strange Prime number pattern
I don't know. But here's some results: There's a theorem, stating that for every number k, there exists infinity couples of consecutive prime numbers, such that the gap between them is greater or equal to k. Graphically that means, that when we have enough prime numbers, this graphic will cover some square, no matter what the square side is. More basically, this structure grows. Not so helpful, but it's proven to be true.
IPBLE: Increasing Performance By Lowering Expectations.
Re: Strange Prime number pattern
But can it be proven to grow infinitely? :-)
|