mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2020-01-02, 22:05   #1
Akjorts
 
Jan 2020
Moscow

58 Posts
Question Are the numbers m*N! +- p suitable as candidates for primes?

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
Akjorts is offline   Reply With Quote
Old 2020-01-02, 22:58   #2
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

113758 Posts
Default

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)?
VBCurtis is offline   Reply With Quote
Old 2020-01-03, 15:08   #3
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

4,643 Posts
Default

Quote:
Originally Posted by Akjorts View Post
<snip>
Does it make sense to look at such numbers for example: (10^1000)*8!+11, (10^1000)*8!+13,..?
<snip>
Probably not. For one thing, they're not (as far as I can tell) particularly easy to test for primality.

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]
Dr Sardonicus is offline   Reply With Quote
Old 2020-01-03, 16:25   #4
Akjorts
 
Jan 2020
Moscow

1012 Posts
Default

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.
Akjorts is offline   Reply With Quote
Old 2020-01-03, 16:59   #5
Akjorts
 
Jan 2020
Moscow

5 Posts
Default

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
Akjorts is offline   Reply With Quote
Old 2020-01-04, 00:11   #6
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

3×5×137 Posts
Default

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
a1call is offline   Reply With Quote
Old 2020-01-04, 11:29   #7
Akjorts
 
Jan 2020
Moscow

5 Posts
Default

Quote:
Originally Posted by a1call View Post
IMHO the rarity of factorial primes is debatable.

a1call, If I understand correctly, to find a factorial prime, we must first calculate the factorial itself. This is the main difficulty with such numbers.
Akjorts is offline   Reply With Quote
Old 2020-01-04, 14:54   #8
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

3·5·137 Posts
Default

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
a1call is offline   Reply With Quote
Old 2020-01-04, 15:20   #9
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

3×5×137 Posts
Default

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
a1call is offline   Reply With Quote
Old 2020-01-07, 21:47   #10
Akjorts
 
Jan 2020
Moscow

5 Posts
Default

Quote:
Originally Posted by a1call View Post
Another consideration is that in order for n!+/-k to be prime-candidate, k does not necessarily needs to be prime, .
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
Akjorts is offline   Reply With Quote
Old 2020-01-08, 00:07   #11
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

3·5·137 Posts
Default

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.
a1call is offline   Reply With Quote
Reply



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

All times are UTC. The time now is 18:01.


Fri Jul 16 18:01:55 UTC 2021 up 49 days, 15:49, 1 user, load averages: 1.61, 1.43, 1.44

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.