set of formulas for computing all prime numbers

Hi,

Here is a set of formulas for computing all prime numbers:

for each go from n=0 to n=infinity and the combined outputs will contain all the primes

1+60n 3+60n 7+60n 11+60n 13+60n 17+60n 19+60n 23+60n 29+60n 31+60n 37+60n 41+60n 43+60n 47+60n 49+60n 53+60n 59+60n

ie for 1+60n

for n = 1,2,3

61=1+60*1 121=1+60*2 181=1+60*3

not all will be prime, but the above formulas will have all the primes, and none of them will be repeated, ie each formula will produce a unique set of prime numbers, when combined give all the primes.

If anyone is interested in how I figured this out I will give a full description :D

cheers, Jamie

Reply to
Jamie M
Loading thread data ...

Here's a hint about how it works:

This set of formulas (just two) will also find all primes (except for primes 2 and 3) with a unique set of primes in each of the formulas, non-primes will also be produced but all the primes (except 2 and 3) are in those two formulas too.

1+6n 5+6n

for n=0 to n=infinity

cheers, Jamie

Reply to
Jamie M

Wrong! 2 is missing from your list!

--
Virgil 
"Mit der Dummheit kampfen Gotter selbst vergebens." (Schiller)
Reply to
Virgil

Sorry, see the followup message I posted, all primes except 2 and 3 are there in that case, and just 2 is missing in this one.

cheers, Jamie

Reply to
Jamie M

Ok here is how i think it works (at least partly)

for the formula's above, ie 7+60n, it will produce some primes for n=0 to n=infinity as long as 7 integer is prime or an integer power of a prime, and also as long as it is not a factor of the number

60 in this case, ie 5 although it is prime, will not produce any primes in the formula 5+60n for n=0 to n=infiniti as 5 is a factor of 60.

So it is pretty easy to generate other prime creating formulas knowing this, I still haven't tested it that much, but the prime distribution is all based around

6, and integer multiples/powers of 6, so I am most confident that the formula will work in that case, ie for 6 or 60 in the above examples, but it might work for other ones too.

cheers, Jamie

Reply to
Jamie M

Stupid f*ck.

Reply to
DecadentLinuxUserNumeroUno

How about just the sequence "n" from 1 to infinity? It will also contain all the prime numbers, and be equally useless, with exactly the same characteristics as your list.

No one is interested in a list that contains all the primes, plus lots of non-primes. If you could produce a list containing an unlimited number of primes and /no/ non-primes, even if it does not have /all/ the primes, then you would be on to something.

Reply to
David Brown

so it's useless.

Bye Jack

Reply to
jack4747

There are polynomials whose positive values (for positive integer values of the variables) are all and only the prime numbers. I think the first one had 26 variables. Perhaps there are examples with fewer than that now.

Reply to
Moufang Loop

Start with a + 60n, where a goes from 0 to 59, and all n, n >= 0. That gives you the set of all non-negative integers.

Now remove those for which a is zero, since the results are either zero, or are divisible by 2, 3 and 5. Also remove those for which a is divisible by 2, 3 and 5, since the resulting numbers will also be divisible by the same number (60 being divisible by all of them). Finally, for some unfathomable reason, put back those for which a is 3 (all of which are divisible by 3). Now you have the list given above.

So it's mind numbingly trivial, pointless, and useless.

Sylvia.

Reply to
Sylvia Else

Hi,

No that's incorrect ie when a is 3:

a+60n produces primes still.

The formula for producing primes seems to be that for a, a must be a prime or a power of a prime, ie above where a=49 that is a prime squared (7^2). In either case if a is a prime or a power of a prime, it is excluded from the list if it 60 is a multiple of it.

cheers, Jamie

Reply to
Jamie M

Hi,

Oh ya 3 shouldn't be in the list as 60 is a multiple of it, but all the other values for 'a' that produce primes, a should be a prime or a power of a prime I think.

There is a definite pattern in the distribution of prime numbers around the number 6, ie. the spacing of primes has many consecutive spacings of 6 digits compared to other digits, the 6 spaced primes occur the most. This is why I tried to make these formulas.

cheers, Jamie

Reply to
Jamie M

Are there? I thought there was a proof that no such polynomial could exist with constant coefficients. A set of diophantine equations and an inequality relation do exist to predict primes but it is messy.

As toy models for predicting primes that look OK for a while

p = 41 + n + n^2

is hard to beat n = 0..39 are all primes, but for n = 40 p= 41^2

--
Regards, 
Martin Brown
Reply to
Martin Brown

Hi,

Yes it has all the primes but the density of primes is lower, ie out of 60 formulas, 43 don't have any primes, yet all 60 formulas have an equal number of digits, so the density of primes is something like 3.5x higher as only 17 formulas out of 60, 28% of the overall digits contain all the primes.

cheers, Jamie

Reply to
Jamie M

Lol, see what you make of this:

The way I "figured" this stuff out:

I started with the sequence of primes up to 1billion+ etc

2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53...

From this sequence I generated a new "gap" sequence:

1,2,2,4,2,4,2,4,6,2,6,4,2,4,6,6,2,6,4,2,6,4..

which is the gap between consecutive digits in the prime sequence.

Then I used a custom algorithm on that sequence that removes all pairs of unique digits that repeat at least twice, ie all 2,4 are removed. After doing that step I check the "gap" of the remaining digits and this is what I got:

1,2,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,18,6,18,6,6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,12,6,6,6,6,6,6,18,6,6,6,6,86,6,6,6,6,18,6,6,6,78,6,18,6,6,6,6,6, 6,6,6,6,6,6,6,6,12,6,6,6,6,.....

I tested this type of algorithm on lots of different areas of digits in the prime numbers and the 6 gap always stands out.

So I decided to make a hexagon and fill it in with numbers in concentric circles (kind of like a prime number spiral), and then noticed all the prime numbers are only in two arms of the hexagon.

1+6n and 5+6n

I noticed that the gap sequence has multiples of 6, ie 18, so decided to make a 60 sided "Hexacontagon" (didn't know it was called that) and filled it in with all the positive integers in concentric circles,

60 digits per circle, and noticed that all the prime numbers exist in 17 of the hexacontagon arms, and these arms first digits were all prime numbers or powers of prime numbers, and also not divisors of 60.

So that is about it :D

Here are some more gap sequences with the repeating pairs removed from different areas on the prime numbers:

prime gap sequence 50,900,000 to 60,000,000 (100,000 prime gaps)

6,6,6,12,18,132,12,12,6,6,12,6,12,18,6,6,12,6,6,6,6,6,6,104,6,6,6,12,6,18,6,6,6,6, 6,6,6,6,6,18,6,24,12,136,18,146,6,6,12,6,6,18,6,6,6,6,12,114,18,12,12,6,6,12,6,12, 12,6,6,42,6,12,6,6,6,12,12,6,6,18,6,6,24,36,18,6,6,6,6,12,6,6,12,12,6,6,144,18,6,12, 108,6,6,6,12,6,6,6,6,6,12,6,12,12,6,12,6,6,12,12,6,6,18,12,6,6,6,6,6,6,24,6,6,6,6,6, 6,6,6,6,6,6,6,6,12,6,6,6,12,18,6,6,18,174,6,12,6,6,6,6,6,124,6,6,6,6,6,6,6,6,6,12,6, 6,18,6,6,6,12,6,18,6,6,30,160,18,18,6,6,18,12,6,6,12,6,12,6,156,6,12,6,6,6,6,6,6,12, 6,18,12,156,18,6,30,6,12,12,158,6,12,120,106,18,6,6,178,24,6,6,6,6,6,6,18,12,6,12,6, 12,12,12,12,6,6,12,6,6,6,6,6,18,30,18,6,6,12,6,18,6,12,6,12,18,120,6,6,6,6,12,6,6,12, 114,6,6,12,12,6,6,30,12,6,6,30,6,6,12,6,18,6,6,6,30,30,6,12,6,6,6,6,6,6,12,6,6,6,12, 6,6,6,6,6,18,12,6,6,6,24,6,6,6,6,12,12,6,6,154,12,12,6,6,140,12,6,6,6,6,6,6,6,6,18,6, 6,12,6,18,6,6,30,96,6,12,6,6,6,12,6,6,12,12,6,6,6,6,30,18,6,18,30,12,6,6,6,18,12,6,12, 6,6,130,6,6,6,18,6,6,12,6,6,12,12,6,6,12,6,18,6,6,6,154,6,6,18,12,12,18,6,12,6,6,6,6, 6,12,6,134,6,6,6,6,12,6,6,6,6,18,6,18,6,6,6,12,6,12,30,6,6,48,6,18,6,6,24,6,18,6,6,12, 6,6,12,6,12,30,12,12,6,6,12,6,12,18,12,6,6,6,6,6,12,12,6,6,6,12,12,112,12,122,6,6,12, 24,6,6,6,6,12,6,6,6,6,18,12,6,6,12,12,12,6,6,6,12,6,6,6,6,6,6,6,12,6,6,6,12,12,18,6,6, 24,6,6,6,6,6,6,6,24,6,18,12,12,6,18,6,12,12,18,6,6,6,6,12,18,6,6,6,6,6,24,6,6,18,18,12, 6,6,12,6,138,18,6,24,6,18,18,12,6,12,6,6,6,6,74,6,6,30,12,6,6,6,24,12,6,138,6,6,12,6,6, 6,6,136,6,6,6,18,12,6,12,18,12,6,12,6,12,18,12,6,12,12,6,142,6,6,6,6,126,6,6,6,6,152,6, 130,12,18,150,6,12,6,6,6,6,168,138,6,6,6,18,24,6,148,12,6,6,6,6,6,36,6,12,6,6,6,12,12,6, 6,18,6,6,24,18,6,6,6,12,18,12,18,6,18,18,18,18,6,18,12,102,6,6,6,6,6,12,176,18,6,6,6,6, 24,6,6,6,134,6,6,6,24,6,6,6,24,30,6,6,6,6,6,6,6,6,6,12,6,134,30,12,6,6,150,6,6,12,18,6, 24,6,6,6,6,138,18,6,6,6,18,6,12,12,18,12,6,6,6,6,6,12,6,12,6,6,6,12,6,6,6,6,12,18,18,6, 6,6,18,6,12,18,6,12,6,18,12,6,12,6,18,6,12,12,6,6,12,6,6,18,6,104,6,6,18,6,6,6,12,6,6,12, 12,6,6,6,18,12,6,6,12,6,6,6,6,6,6,12,12,6,150,6,6,6,6,6,6,12,12,152,136,6,18,12,6,6,6,18, 12,6,24,12,6,6,12,6,6,6,6,6,6,12,6,122,6,6,6,6,178,24,6,6,120,18,116,6,6,18,12,6,6,6,6, 12,156,24,30,6,12,18,124,6,12,6,6,6,12,12

prime gap sequence 80,000,000 to 81,000,000 (1million prime gaps)

114,6,100,116,116,110,106,130,12,12,12,6,86,6,118,6,12,12,104,126,24,6,6,12,6,24,78,56,6, 6,108,92,120,6,80,6,6,12,6,72,12,6,6,6,98,6,128,118,6,6,12,6,12,30,6,110,12,6,6,6,6,6,6, 110,90,6,6,88,6,12,6,6,6,6,6,152,102,80,6,6,130,6,42,100,30,12,104,30,98,36,152,6,112,6,6, 98,6,6,6,6,12,92,6,24,80,120,12,114,6,106,6,6,6,96,18,12,112,124,104,96,12,6,6,6,6,108,24, 6,12,114,108,160,6,12,6,100,12,12,30,30,12,12,118,12,6,12,82,12,102,6,108,12,6,18,170,94,6,6,6,104,74

prime gap sequence 1,000,000,000 to 1,001,000,000 (1million prime gaps) [12,6,94,132,18,152,12,74,120,12,6,6,6,108,6,118,6,176,116,6,130,156,6,12,6,106,18,6,12,30,

112,6,22,122,138,104,6,128,112,30,148,124,6,6,124,116,30,100,100,126,130,110,6,6,116,6,94, 154,102,18,136,12,82,6,126,6,24,6,104,106,6,146,84,126,66,42,42,6,6,6,132,18,108,128,6,6,96, 120,6,126,136,108,120,102,150,118,6,24,150,6,100,6,6,128,130,6,114,80,150,82,18,150,108,6,154, 120,96,6,104,134,18,18,6,156,144,110,106,134,6,122,12,6,30,112,88,130,100,36,6,18,108,154,6

cheers, Jamie

Reply to
Jamie M

Your formula has a "prime density" that tends towards 0 very rapidly as n gets bigger - i.e., once you have gone beyond the first few thousand numbers, almost all numbers generated by the formula are non-primes. Exactly the same thing applies to my formula. They are equally useless.

There are a few simple formulas that happen to produce a surprisingly

formula - it produces primes for n from 0 up to 39. But as n gets bigger, the density tends to 0 - this is the same for any such formula. Thus such formula have no practical applications, and are merely interesting mathematical curiosities.

Your formula - like mine - is not one of these unusual high density formula. It is therefore not interesting or special in any way.

Reply to
David Brown

In one variable.

Reply to
Moufang Loop

Hi,

Yes the prime occurrence tends to zero as n approaches infinity, but even so it is always 3.5x higher density than the sequence "n" from 1 to infinity is. The formulas I gave produce ALL the primes unlike

cheers, Jamie

Reply to
Jamie M

The inequality generated from the Diophantine equations gives you the polynomial whose positive values (for positive integer values) are primes. You are talking about the same thing, just seen from a slightly different angle.

It's not particularly useful in practice, of course, as you try to enumerate through 26 simultaneous sequences of positive integers and figure out which sets give you positive results (most choices give you negative results).

And (according to the infallible Wikipedia) this can be reduced to a polynomial in only 9 variables - but it is of degree 10^45, which is quite inconvenient.

Reply to
David Brown

Hi,

Also the prime number density can be increased beyond 3.5x (for 60n) ie. for 60^3*n, that is 216000, and the values for:

a+60^3n for a are just the prime numbers or powers of prime numbers below 216000 that are also not divisors of 216000 (I believe).

So the number of formulas decreases in this case, but the overall number of formulas used to generate all possible positive integers is still 216000, so the prime generating formulas are a small subset of the overall and have increasing density u increases in 60^u

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.