![]() |
|
|
#1 |
|
Jan 2020
Moscow
5 Posts |
Hi all
Could you answer please? Do I understand correctly that numbers of the form n+-1 are best suited for primality tests? For example, because of the fact that any prime number in the interval [m*N!-N^2, m* N!+N^2] has the form m*N!+- p, (p>N is also prime and excluding primes m*N!+-1), can such numbers be used as prime candidates? Or testing such numbers is too ineffective? The number of factorial primes found is quite small. Does it make sense to look at such numbers for example: (10^1000)*8!+11, (10^1000)*8!+13,..? Thank you for your opinions |
|
|
|
|
|
#2 |
|
"Curtis"
Feb 2005
Riverside, CA
22×1,217 Posts |
When choosing a form to use for prime-searching, one should consider how fast the primality test (and corresponding software) will be for that form.
Numbers of form k * b^n +-1 use a Lucas-Lehmer or Proth test, which are very quick tests. There are other forms which have somewhat quick tests- you should browse the forum for software PFGW, and see what forms it can test for ideas. A probable-prime test (prp) can be run on a number of any form, but getting a "probably prime" result from such a test leaves you still needing to prove the number is prime. If your form has no specialized primality test, Elliptic Curve (ECPP) proof is available- software "Primo". But that gets rather slow for primes larger than ~10,000 digits. To guide you further, it would help to know how big a prime you're looking for, or other motivations you might have leading you to one form or another. Do you want to be part of a project, or blaze your own trail? Do you have programming chops sufficient to implement a sieve program to pre-factor many candidates of your form before you prp, or do you want to choose among forms for which sieve software is available (or, choice #3, pre-factor one candidate at a time rather than use a sieve)? |
|
|
|
|
|
#3 | |
|
Feb 2017
Nowhere
7×23×29 Posts |
Quote:
With N = 8!*10^1000, the numbers N + p, p prime, 7 < p < K, are very likely to be composite if K is small compared to N. The number of primes < K is roughly K/log(K), while the number of primes between N and N + K is (even more roughly) K/log(N). So only about log(K)/log(N) of the values N + p are likely to be prime. There is also the possibility that N + m is prime for composite m < K. Of course, in this case m can't have any prime factors less than 11. I ran a simple sweep using Pari-GP, for the first 30 (pseudo)primes greater than N. I can't guarantee that all the pseudoprimes are actually prime, but I can guarantee that there aren't any primes in [N, N + 55277] that aren't on the list. As you can see, only 11 of the 30 values are of the form N + p, p prime. Code:
? n=8!*10^1000;p=n-1;for(i=1,30,p=nextprime(p+1);print(i" "p-n" "factor(p-n))) 1 1703 [13, 1; 131, 1] 2 4129 Mat([4129, 1]) 3 6227 [13, 1; 479, 1] 4 7807 [37, 1; 211, 1] 5 10373 [11, 1; 23, 1; 41, 1] 6 10387 [13, 1; 17, 1; 47, 1] 7 12361 [47, 1; 263, 1] 8 13099 Mat([13099, 1]) 9 19727 Mat([19727, 1]) 10 22031 Mat([22031, 1]) 11 29173 Mat([29173, 1]) 12 30571 [19, 1; 1609, 1] 13 30703 Mat([30703, 1]) 14 32363 Mat([32363, 1]) 15 32663 [89, 1; 367, 1] 16 34639 [11, 1; 47, 1; 67, 1] 17 34807 Mat([34807, 1]) 18 39349 [19, 2; 109, 1] 19 39553 [37, 1; 1069, 1] 20 41747 [109, 1; 383, 1] 21 41983 Mat([41983, 1]) 22 43879 [11, 1; 3989, 1] 23 47417 Mat([47417, 1]) 24 48427 [79, 1; 613, 1] 25 50737 [113, 1; 449, 1] 26 53033 [181, 1; 293, 1] 27 53101 Mat([53101, 1]) 28 53737 [17, 1; 29, 1; 109, 1] 29 55079 Mat([55079, 1]) 30 55277 [167, 1; 331, 1] |
|
|
|
|
|
|
#4 |
|
Jan 2020
Moscow
58 Posts |
VBCurtis I was considering whether a project could come out of this possibility and I expected the answer that it was impossible to mess with such numbers at all (and Dr Sardonicus seems to have explained it quite convincingly). Thank you for showing me the possibilities that I should definitely explore.
|
|
|
|
|
|
#5 |
|
Jan 2020
Moscow
516 Posts |
Dr Sardonicus, thank you for showing the real boundaries of the interval with the center in m*n!, which must be considered in order for the first prime number to appear.
In the case of (10^1000)*8! I meant the interval of only [(10^1000)*8! - 64, (10^1000)*8! + 64]. Only there prime numbers can occupy places that are removed from the center by a value equal to another small prime number. I was hoping that this fact would lead to some increase in the density of prime numbers in this interval. But of course, the fact that the first prime number can appear only at 8!*10^1000 + 1703, makes my idea not interesting. Last fiddled with by Akjorts on 2020-01-03 at 17:06 |
|
|
|
|
|
#6 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
2,063 Posts |
While the closest primes of the form k.n!+/-p will have to be at least n+1 away from k.n!, And while they are not easily proven prime, primes of the form k.n!+/-1 are only 1 away and they are provable via N+/-1 methods as long as all the prime factors of k are known.
IMHO the rarity of factorial primes is debatable. Last fiddled with by a1call on 2020-01-04 at 00:26 |
|
|
|
|
|
#8 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
2,063 Posts |
Are even-primes rare?
Obviously yes since there is only one. Is primality rare among even-prime candidates? No, 100% of even-prime candidate are prime. To say that factorials grow exponentially is the understatement of the millennium. Factorials are rare (even though there is a factorial associated with any given positive integer). The only known*1 factorial with both flavors of primes is 3!. Are factorial primes rare among the factorials-prime-candidates considering their size? I would venture not, leaving the math to others. *1 Let's leave the possibility of having more than 3 twin-factorials-prime-candidates to another thread. Last fiddled with by a1call on 2020-01-04 at 15:15 |
|
|
|
|
|
#9 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
2,063 Posts |
Another consideration is that in order for n!+/-k to be prime-candidate, k does not necessarily needs to be prime, but rather only coprime to n!.
Last fiddled with by a1call on 2020-01-04 at 15:25 |
|
|
|
|
|
#10 |
|
Jan 2020
Moscow
5 Posts |
a1call I was thinking of using the fact that in the specified interval, numbers can only be prime if k is also a prime number.
Last fiddled with by Akjorts on 2020-01-07 at 21:47 |
|
|
|
|
|
#11 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
2,063 Posts |
I fail to see the significance of limiting the range to k.n!+/-n^2.
What's so magical about that range other than as you mentioned the addend will have to be prime and greater than n. If you extend the range you can ease the constraint to being coprime rather than absolutely prime. I do not see any advantage to range limitation here. It is not easier to find a prime than a coprome.
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| primes and all k tuplets normalize merits allways < 1, for every big numbers | hal1se | Other Mathematical Topics | 2 | 2020-12-08 13:17 |
| any suitable sieve written in C or Python? | Shen | Information & Answers | 4 | 2017-01-05 04:49 |
| Generalized Fermat numbers (in our case primes) | pepi37 | Conjectures 'R Us | 4 | 2015-10-09 14:49 |
| Available Ranges suitable for P4s | garo | Lone Mersenne Hunters | 1 | 2003-09-10 21:10 |
| Search for Mersenne primes by checking for perfect numbers | dsouza123 | Miscellaneous Math | 33 | 2003-09-02 16:18 |