These two sets of formulas will produce no prime numbers from n=0 to n=infinity, except for primes 2 and 3 in set1, and prime 2 in set2.
The interesting ones are with odd numbers, as the even numbers are easy to see they don't produce primes, but the odd ones not producing primes is pretty interesting.
set1:
2+6n (produces a single prime 2)
3+6n (produces a single prime 3)
4+6n
6+6n
Didn't find your answer? Ask the community — no account required.
J
Jamie M
16+60n should be included in the second list..
J
jack4747
if n=0 => 5
5 is prime. So the set is wrong.
Bye Jack
J
Jamie M
The formula is a bit buggy around the edges :D
R
Robert Baer
Guaranteed to do that: 2*n.
V
Virgil
I
Given p is prime, and m and n are naturals, m*p + n*p will never be prime!
Big deal!
Virgil
"Mit der Dummheit kampfen Gotter selbst vergebens." (Schiller)
J
Jamie M
Hi,
Cool table, did you make that one up? :)
Seems to work great.
Here is another one I came up with today:
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
J
Jamie M
Here's some output of ratios of how many of the formulas for a given n are prime, ie for n=30 below, 0.36666.. or
11 out of the 30 (11/30=0.3666..) formulas produce primes.
The formula with the lowest ratio's produce the most primes, so for n=210 below (product of primes 2*3*5*7), less than a quarter (0.247619048) of the 210 possible formulas produce primes, ie 52 formulas produce primes for n=210.
This ratio should decrease further for bigger products of primes, ie as above:
product of primes ie: 2*3*5*7*11*13*17*19*23*29 =6469693230
So now can you calculate a 500 digit prime number and win some money? :D Or prove a prime gap conjecture.
cheers, Jamie
J
Jamie M
Here is something that might be applicable:
formatting link
Many mathematicians believe that the true size of large prime gaps is probably considerably larger ? more on the order of (log X)2, an idea
Gaps of size (log X)2 are what would occur if the prime numbers behaved like a collection of random numbers, which in many respects they appear
said. ?We just don?t understand prime numbers very well.?
cheers, Jamie
J
Jamie M
Hi,
a+840n for n integers, has more integer values for 'a' that produce primes than any other equation up to a+1000n (still testing higher)
630 number of prime producing equations=148 ratio 148/630 = 0.234920634920635
840 number of prime producing equations= 196 ratio 196/840 = 0.233333333333333
840 seems to have the fewest a values that generate primes since 840 / 7 / 5 / 3 / 2 / 2 / 2 = 1
or in other words 840 can be divided completely by primes.
630 7 / 5 / 3 / 3 / 2 = 1
or same thing these primes can be multiplied to generate these special formulas:
840 = 7*5*3*2*2*2
630 = 7*5*3*3*2
cheers, Jamie
J
Jamie M
For the number 840 above, according to wikipedia:
formatting link
it is all of these:
formatting link
formatting link
formatting link
So based on what I find for other numbers with the lowest ratios, like 840 has, I will narrow it down to see which of those three are important for this formula.
cheers, Jamie
J
Jamie M
A quick targeted test for 2310, chosen to check my idea that products of primes will have the fewest prime producing formulas:
2310=2*3*5*7*11
2310 number of prime producing equations= 485 ratio= 0.20995670995671
Interesting that page says: "Phi(n)/n is a new minimum for each primorial. - Robert G. Wilson v, Jan
10 2004"
"Smallest number stroked off n times after the n-th sifting process in an Eratosthenes sieve. - Lekraj Beedassy, Mar 31 2005"
"Apparently each term is a new minimum for phi(x)*sigma(x)/x^2. 6/Pi^2 < sigma(x)*phi(x)/x^2 < 1 for n > 1. - Jud McCranie, Jun 11 2005"
" The peaks (i.e., local maximums) in a graph of the number of repetitions (i.e., the tally of values) vs. value, as generated by taking the differences of all distinct pairs of odd prime numbers within a contiguous range occur at regular periodic intervals given by the primorial numbers 6 and greater. Larger primorials yield larger (relative) peaks, however the range must be >50% larger than the primorial to be easily observed. Secondary peaks occur at intervals of those "near-primorials" divisible by 6 (e.g., 42). See A259629. Also, periodicity at intervals of 6 and 30 can be observed in the local peaks of all possible sums of two, three or more distinct odd primes within modest contiguous ranges starting from p(2) = 3. - Richard R. Forberg, Jul 01 2015 "
Looks like I finally found what I'm doing, assuming this is the matching sequence.
cheers, Jamie
J
Jamie M
Here is the list of equation coefficients that produce all the primes for 2310 for n=0 to n=infinity
ie for the last one, the equation 2309 + 2310n for n=0 to n=432 produces 166 primes, pretty decent ratio, that's a 38.4% chance for each value to be prime in that range up to n=432, ie primes up to 1million.
All of those equation coefficients produce similar occurrences of the primes, so all primes up to 1million can be calculated with the set of these formulas with about 38.4% +- a couple percent occurrence.
Also someone said before "what is the point of this if you have to calculate all these coefficients first anyway" well for these special numbers, ie 2310, I think there might be a formula to generate the big list of coefficients above, as there is a quite periodic pattern between the coefficient values. Here is the spacing for the above coefficients:
Maybe comparing these spacings with other values besides 2310 can show the overall formula, then if that is found it should be easier to calculate primes. It's possible there is no pattern that can be found in the spacing too, in fact these special numbers, ie 2310 might just have a more noisy spacing of coefficients than the less useful values which have lower prime density.
If anyone sees a pattern in there though let me know :D
cheers, Jamie
J
Jamie M
Ok,
I realize now that the list of prime generating coefficients for 2310, is *almost* just the sequence of prime digits, except for 169, and some semi-primes 221 in there etc..
So I am pretty sure that if instead of using 2310, I use a REALLY big number with the same properties, ie assuming the important property is
2310 being primiorial:
formatting link
then the biggest one listed on that page is: 557940830126698960967415390 so that is the new formula to use, and now since it is such a big number I hypothesize that the sequence of prime generating coefficients for it, are going to be a lot closer to the actual sequence of prime numbers, with fewer semi-primes in there..
So now there is at least a formula to calculate the set of coefficients to generate prime numbers at really big scales.
ie:
7 + 557940830126698960967415390n for n=0 to n=infinity
this formula should have really good prime number density (compared to just doing a brute force prime number search) up to maybe
10^30 or something like that. To calculate all primes using that formula it is the sequence of these formulas (except for possible errors of coefficients that are coprimes being excluded)
Calculating all the primes up to 557940830126698960967415390 is still a lot of calculating, but then once they are calculated, then even more primes can be found using that primorial set of formulas.
cheers, Jamie
J
Jamie M
Especially when Y is even.
Hi,
What about 7 + 2310n?
Primorial numbers ie 2310, have more distinct prime factors than any number smaller than it. Yet Y in this case, ie 7 has the common factor (of itself) with 2310.
The best formula to find the most primes I found so far is:
most likelihood of being prime = a prime below the primorial + (primorial)n
cheers, Jamie
J
Jamie M
Hi,
So given a very large number that you don't if it is prime or not, this algorithm (with arbitrary precision math) should be able to quickly see if the number is prime without doing any factorization? Is that right, and are there other algorithms that can do this?
cheers, Jamie
J
Jamie M
Hi,
Actually that is even better, I think I made an error in my code to select these functions as prime producing based on the fact that they produce a single prime.. but if that is true that these formulas produce no more than a single prime, then the new formula excluding the single prime is:
NOT_prime = a prime below the primorial + (primorial)n
Can that formula be used to check if a very large number is prime?
ie. try to subtract integer multiples of primorial numbers from a very large number, and if the result is prime then the very large number isn't prime maybe. ie 9247-2310*4=7
so 9247 isn't prime if that formula is true.
cheers, Jamie
J
Jamie M
less than this number divides the original number evenly, if not you have a prime. This may be considered brute force. however.
Hi,
Actually that above formula I wrote is wrong, ie for
Y + 2310n, all prime producing functions (that produce more than a single prime) have Y as a prime larger than 11, since 2310 = 2*3*5*7*11.
So my formula before is correct, Y tends to be always prime the bigger then primorial number is, but for Y less than the primorial largest prime factor (ie 11 for 2310) then there is only one prime produced, but larger primes than the largest primorial factor produce many primes.
ie for 13 + 2310n, there are 164 primes produced for n up to 432
164/432=38% primes
cheers, Jamie
J
Jamie M
Also for 13 + 2310n, there are 1370 primes produced for n up to 4329.
1370/4329=31.6%
cheers, Jamie
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.