set of formulas for computing all prime numbers

I like this polynomial[1] not because I'll ever use it, but because it lubricates my imagination when I am trying to think about Goedel's incompleteness proof.

If I understand things properly, this prime polynomial[1] _encodes_ the definition of prime number in arithmetic. And it looks truly intimidating.

And Goedel produces (or proves exists) soemthing which _encodes_ the axioms and inference rules for a particular formal system. And which makes the prime polynimial[1] look trivial in comparison.

I have to say Goedel's incompleteness is not intuitive to me, though I believe it when others tell me it's valid. HOWEVER, when I think about what this unprovable sentence probably looks like, it becomes more intuitive to me.

[1]
Reply to
Jim Burns
Loading thread data ...

3.5 times higher than useless is still useless.

What do you think is the point of your list? What could you or anyone else do with a list that has a mix of primes and non-primes? Your list is nothing more or less than all positive integers with multiples of 2,

3 and 5 removed. It can't be used by anyone looking for prime numbers, and it does not show any curious patterns or interesting mathematics.
Reply to
David Brown

You can make up any formula you like - they just produce a list of numbers, some of which are prime and some of which are non-prime, and the prime density quickly heads to 0 as you go down the list.

If you can find a sequence whose asymptotic behaviour beats 1/log(N) for prime density, then you will have found something useful. If you can find a sequence whose prime density at low values is unusually high

Until then, you are just playing around. (There is nothing wrong with playing around with numbers, formula and mathematics - it can be fun and educational. It's only when you posts these things as though they were great revelations and mathematical breakthroughs that you look silly.)

Reply to
David Brown

formatting link

--
God @TheTweetOfGod 8:31 PM - 19 Apr 2014 
THE NEW 10 COMMANDMENTS  
1 Laugh.  
2 Read.  
3 Say please.  
4 Floss.  
5 Doubt.  
6 Exercise.  
7 Learn.  
8 Don't hate.  
9 Cut the bullshit.  
10 Chill. 
Retweets 24,787 Likes 19,364
Reply to
R Kym Horsell

Hi,

Ok what about this pattern I found in the distribution of primes:

I generated a list of all the primes in the first 1billion digits, then counted the spacing between all the primes, and got this result:

name is the spacing between consecutive primes, and result is the count of how many times that spacing occurred, as you can see from the below, the spacing of 6 is the most common gap between primes, and also there is an oscillation of the spacing, where multiples of 6 spacings always have more primes! That is a fantastic result and makes me equivalent to a genius with a capital J (jenius).

Take a look at the below if you don't believe me, ie for name=6 that is the count of all the primes in the first 1billion digits of numbers with a prime spacing of 6.

How do you explain that there are these peaks in the prime distribution on multiples of 6 if it is so simple!?

cheers, Jamie

{ Name = 1, Count = 1 } { Name = 2, Count = 3424506 } { Name = 4, Count = 3424679 } { Name = 6, Count = 6089791 } { Name = 8, Count = 2695109 } { Name = 10, Count = 3484767 } { Name = 12, Count = 4468957 } { Name = 14, Count = 2464565 } { Name = 16, Count = 1846097 } { Name = 18, Count = 3351032 } { Name = 20, Count = 1824043 } { Name = 22, Count = 1569679 } { Name = 24, Count = 2367474 } { Name = 26, Count = 1119585 } { Name = 28, Count = 1219243 } { Name = 30, Count = 2177991 } { Name = 32, Count = 683896 } { Name = 34, Count = 719531 } { Name = 36, Count = 1171524 } { Name = 38, Count = 548746 } { Name = 40, Count = 648780 } { Name = 42, Count = 954456 } { Name = 44, Count = 389634 } { Name = 46, Count = 334720 } { Name = 48, Count = 577247 } { Name = 50, Count = 328066 } { Name = 52, Count = 245804 } { Name = 54, Count = 410754 } { Name = 56, Count = 211462 } { Name = 58, Count = 181948 } { Name = 60, Count = 371839 } { Name = 62, Count = 115558 } { Name = 64, Count = 118951 } { Name = 66, Count = 216787 } { Name = 68, Count = 88396 } { Name = 70, Count = 125564 } { Name = 72, Count = 126663 } { Name = 74, Count = 62526 } { Name = 76, Count = 55113 } { Name = 78, Count = 105313 } { Name = 80, Count = 53522 } { Name = 82, Count = 37982 } { Name = 84, Count = 78077 } { Name = 86, Count = 27793 } { Name = 88, Count = 28878 } { Name = 90, Count = 58057 } { Name = 92, Count = 19282 } { Name = 94, Count = 17669 } { Name = 96, Count = 31078 } { Name = 98, Count = 16175 } { Name = 100, Count = 16900 } { Name = 102, Count = 22393 } { Name = 104, Count = 10310 } { Name = 106, Count = 8719 } { Name = 108, Count = 15459 } { Name = 110, Count = 9065 } { Name = 112, Count = 7139 } { Name = 114, Count = 10892 } { Name = 116, Count = 4710 } { Name = 118, Count = 4502 } { Name = 120, Count = 9621 } { Name = 122, Count = 2975 } { Name = 124, Count = 3136 } { Name = 126, Count = 5863 } { Name = 128, Count = 2043 } { Name = 130, Count = 2813 } { Name = 132, Count = 3510 } { Name = 134, Count = 1487 } { Name = 136, Count = 1297 } { Name = 138, Count = 2589 } { Name = 140, Count = 1516 } { Name = 142, Count = 953 } { Name = 144, Count = 1555 } { Name = 146, Count = 668 } { Name = 148, Count = 724 } { Name = 150, Count = 1486 } { Name = 152, Count = 506 } { Name = 154, Count = 583 } { Name = 156, Count = 798 } { Name = 158, Count = 306 } { Name = 160, Count = 360 } { Name = 162, Count = 534 } { Name = 164, Count = 247 } { Name = 166, Count = 182 } { Name = 168, Count = 443 } { Name = 170, Count = 198 } { Name = 172, Count = 158 } { Name = 174, Count = 255 } { Name = 176, Count = 128 } { Name = 178, Count = 106 } { Name = 180, Count = 200 } { Name = 182, Count = 80 } { Name = 184, Count = 89 } { Name = 186, Count = 101 } { Name = 188, Count = 33 } { Name = 190, Count = 63 } { Name = 192, Count = 74 } { Name = 194, Count = 32 } { Name = 196, Count = 41 } { Name = 198, Count = 73 } { Name = 200, Count = 28 } { Name = 202, Count = 23 } { Name = 204, Count = 46 } { Name = 206, Count = 13 } { Name = 208, Count = 18 } { Name = 210, Count = 48 } { Name = 212, Count = 12 } { Name = 214, Count = 11 } { Name = 216, Count = 15 } { Name = 218, Count = 6 } { Name = 220, Count = 12 } { Name = 222, Count = 11 } { Name = 224, Count = 6 } { Name = 226, Count = 6 } { Name = 228, Count = 3 } { Name = 230, Count = 3 } { Name = 232, Count = 1 } { Name = 234, Count = 13 } { Name = 236, Count = 5 } { Name = 238, Count = 1 } { Name = 240, Count = 5 } { Name = 242, Count = 4 } { Name = 244, Count = 2 } { Name = 246, Count = 4 } { Name = 248, Count = 4 } { Name = 250, Count = 4 } { Name = 252, Count = 1 } { Name = 260, Count = 1 } { Name = 276, Count = 1 } { Name = 282, Count = 1 }

Reply to
Jamie M

Hi,

You are still missing the point, the formulas contain all the primes:

ie

each indexed prime n other than 3 or 2 are found by 5+n*6 or 7 +n*6 to infinity

showing the importance of the 6 multiple.

cheers, Jamie

Reply to
Jamie M

5 is prime, and 25 is a power of it. All numbers of the form 25 + 60n are composite.

If n is prime, then n + 1, n + 3, and n + 5 are all even, and hence not prime.

If n + 2 is not divisible by 3, then either n + 4 is, or n + 6 is.

However, if n + 6 is divisible by 3, then so is n, so it cannot be prime (n = 3 excepted).

This means that if n and n + 6 are both prime, there is only one number between them that might be prime, and many possible ways in which it might have a factor.

So it's hardly surprising that the spacing of 6 arises often.

Again, it has no significance.

Sylvia.

Reply to
Sylvia Else

I suspect you mean you had a list of the primes up to 1 billion, which is completely different from 1 billion digits. The largest known prime has only 22 million digits. And I hope you used a real prime generator, not your formula.

You will find that there is a general pattern of lower density of spacing "n" as n gets bigger (there are more pairs with spacing 2 than with spacing 20, for example). You will find that the density gets lower as the number of primes gets higher. This means that if you take the count for n = 6 and divide it by the number of primes in your sample, that ratio will go down as the sample size increases.

And you will also find higher density for spacing where the number n has a prime factor p, with this density increase being most prominent for lower p.

So on top of the general pattern of decaying numbers, you will have oscillations with peaks for every third spacing (corresponding to your multiples of 6), smaller peaks for every fifth spacing (multiples of

10), even smaller peaks for every seventh spacing, and so on.

Intuitively, this is perfectly natural - if you have a prime number p, then you know that p + 6 is a good candidate for a prime because you can be sure it is not divisible by 2 or 3. And p + 10 is also a good candidate because you know it is not divisible by 2 or 5 - but it is not as good a candidate as p + 6, because p + 10 might be divisible by 3 and multiples of 3 are more common than multiples of 5.

So yes, it is an interesting pattern - and you could have a lot of fun drawing graphs, looking at peaks and troughs, and seeing how they vary as you pick larger or smaller sample sizes. But it is not a mathematical breakthrough.

mvh.,

David

Reply to
David Brown

No, /you/ are missing the point. You can make any sort of list in that style that includes all primes:

n 2n + 1 3n + 1 and 3n + 2 6n + 1 and 6n + 5 15n + 1, 15n + 2, 15n + 4, 15n + 7, 15n + 8, 15n + 11, 15n + 13, and 15n + 14

You might like to see if you can figure out the pattern here for these formula.

6 just happens to be a nice choice because it is a particular common spacing, and thus the resulting list has a higher prime density than other lists of this type. But there is no fundamental difference in the way these work.
Reply to
David Brown

Look at the source and that is instantly evident.

Reply to
DecadentLinuxUserNumeroUno

so does this one: "n"

6=3*2 that is very significant.

but obscuring the significance

--
  \_(?)_
Reply to
Jasen Betts

Hi,

Thanks, I also found that the oscillations in the spacing of primes seem to disappear when using just a subset of the primes generated from the formula 7+60n for n=0 to n=infinity

There were only 32 different gap spacings in the first 41525 primes using this formula, and no apparently oscillation in the spacings like in the full set of primes, all gaps are multiples of 60:

gap, count { Name = 60, Count = 9818 } { Name = 120, Count = 7679 } { Name = 180, Count = 5921 } { Name = 240, Count = 4577 } { Name = 300, Count = 3397 } { Name = 360, Count = 2655 } { Name = 420, Count = 2224 } { Name = 480, Count = 1282 } { Name = 540, Count = 1001 } { Name = 600, Count = 802 } { Name = 660, Count = 619 } { Name = 720, Count = 400 } { Name = 780, Count = 311 } { Name = 840, Count = 233 } { Name = 900, Count = 150 } { Name = 960, Count = 113 } { Name = 1020, Count = 105 } { Name = 1080, Count = 68 } { Name = 1140, Count = 44 } { Name = 1200, Count = 34 } { Name = 1260, Count = 30 } { Name = 1320, Count = 9 } { Name = 1380, Count = 14 } { Name = 1440, Count = 12 } { Name = 1500, Count = 11 } { Name = 1560, Count = 3 } { Name = 1620, Count = 1 } { Name = 1680, Count = 1 } { Name = 1740, Count = 3 } { Name = 1800, Count = 1 } { Name = 1860, Count = 4 } { Name = 1980, Count = 2 }

That list corresponds to the different gap spacings between the primes.

Is the explanation for a lack of oscillation in this sequence related to there only being a single prime factor of 7, instead of all the prime factors merged together?

I think breaking down the primes into these formulas where the oscillations disappear is a decent way to try to find an underlying pattern to the distribution of primes, but unfortunately once the easy to find oscillations are gone, then so are any patterns to find.

I am thinking of calculating the primes in different number bases rather than just base10 to continue testing my primal instincts, perhaps by comparing the distribution of primes between different bases including base(prime#).

cheers, Jamie

Reply to
Jamie M

Hi,

You forgot a couple above for primes 3 and 5, ie 15n+3 and 15n+5, but other that that looks good, but I'm not sure how you generated x in the 15n + x list?

I wrote a PC program that can generate the pattern for a given n and verified your x's are correct, and also I think I see the interesting pattern, it is mirrored from both sides, ie.

1,2,4,7 (gap 1,2,3) 14,13,11,8 (gap 1,2,3)

Is that the pattern you are talking about? :D

cheers, Jamie

Reply to
Jamie M

Here is another list that contains all the primes except for 5:

25n+1, 25n+2, 25n+3, 25n+4, 25n+6, 25n+7, 25n+8, 25n+8, 25n+9, 25n+11, 25n+12, 25n+13, 25n+14, 25n+16, 25n+17, 25n+18, 25n+19, 25n+21, 25n+22, 25n+23, 25n+24

Only 25n+5, 25n+10, 25n+15, 25n+20 are missing from that list.

cheers, Jamie

Reply to
Jamie M

Hi,

There is no way to really give the formula for large n, since the count of prime producing formulas as a percentage of n decreases as n increases, so there are continually larger gaps added, I guess there is a formula that could show this but I didn't figure it out yet.

But the pattern for the formula for n=60 or n=3600 or n=21600, has a pattern of a repeating gap sequence of

2,4,2,4,6,2,6,4

so for example for n=3600, the formulas that produce primes: a + 3600n have values for a:

1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59,61,67,71,73,77,79,83,89,91, 97,101,103,107,109,113,119,121,127,131,133,137,139,143,149,151,157,161,163,167, 169,173,179,181,187,191,193,197,199,203,209,211,217,221,223,227,229,233,239,241, 247,251,253,257,259,263,... up to 3599

After value 7 in that sequence, ie starting at the gap between 11 and

13, these values of 'a' have a repeating pattern of gaps between consecutive values of 2,4,2,4,6,2,6,4 repeating

But for ie n=6000 the pattern breaks down as there are some gap=8 and gap=10 etc..

For n=999, the pattern is different as well, ie: a + 999n has prime producing values for a:

1,2,3,4,5,7,8,10,11,13,14,16,17,19,20,22,23,25,26,28,29,31,32,34,35,37,38,40,41, 43,44,46,47,49,50,52,53,55,56,58,59,61,62,64,65,67,68,70,71,73,76,77,79,80,82,83, 85,86,88,89,91,92,94,95,97,98,100,101,103,104,106,107,109,110,112,113,115,116,118, 119,121,122,124,125,127,128,130,131,133,134,136,137,139,140,142,143,145,146,149,151, 152,154,155,157,158,160,161,163,164,166,167,169,170,172,173,175,176,178,179,181,182, 184,187,188,190,191,193,194,196,197,199,200,202,203,205,206,208,209,211,212,214,215, 217,218,220,221,223,224,226,227,229,230,232,233,235,236,238,239,241,242,244,245,247, 248,250,251,253,254,256,257,260,262,263,265,266,268,269,271,272,274,275,277,278,280, 281,283,284,286,287,289,290,292,293,295,298,299,301,302,304,305,307,308,310,311,313, 314,316,317,319,320,322,323,325,326,328,329,331,332,334,335,337,338,340,341,343,344, 346,347,349,350,352,353,355,356,358,359,361,362,364,365,367,368,371,373,374,376,377, 379,380,382,383,385,386,388,389,391,392,394,395,397,398,400,401,403,404,406,409,410, 412,413,415,416,418,419,421,422,424,425,427,428,.... up to 998

These values for 'a' have gaps between consecutive values of:

1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,1,2,1,2,1,2,1, 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,2,1, 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, 2,1,2,1,2,1,2,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, 2,1,2,1,2,1,2,1,2,1,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,1,2,1,2,1, 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3, 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, 2,1,2,1 (first 663 gaps)

There are definite periodic patterns in that sequence, ie spacings of 72 values for consecutive value pairs 2,3 3,1 and spacings of 2 values for consecutive value pairs 1,2, as well as second order periodic spacings for digit pairs 1,2

But I don't see a general formula still for all n as you mentioned.

cheers, Jamie

Reply to
Jamie M

How about the sequence n, n=1 -> oo, that contains all the primes and no arithmetic necessary.

Reply to
bloggs.fredbloggs.fred

Hi,

Sure that's a great sequence, I use it all the time, but if you want to find a sequence that has the highest density of primes this is the type of sequence to use:

product of list of primes, ie 2*3*5*7 = 210

coefficient+210n

That formula has the fewest integer coefficients of any other values less than 210 to generate all the primes.

Another example with even more dense primes in the formulas:

product of primes ie: 2*3*5*7*11*13*17*19*23*29 =6469693230

integer coefficient+6469693230n

That formula has the fewest integer coefficients of any other values less than 6469693230 to generate all the primes.

See the pattern! :D

Basically if you take the full set of all infinite prime numbers, and take the product of all of them combined, then make a formula with that like the above, you will still have the best ability to generate all the primes with the highest occurrence density.

cheers, Jamie

Reply to
Jamie M

Ya reckon? 5+6n where n=5????

Reply to
pedro

Ignoring my previous post, the fact that these formulae merely produce a series "containing all primes" is as David states, useless.

When we used to produce lists of primes on archaic computers (1960's and 70's) there were simpler approaches than creating a "super-list" that STILL REQUIRES TESTING.

Reply to
pedro

Hi,

That is what the next step is to find the formula to make the list automatically.

cheers, Jamie

Reply to
Jamie M

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.