mersenneforum.org First prime before & after a factorial is a prime distance away?
 Register FAQ Search Today's Posts Mark Forums Read

 2021-03-02, 13:40 #1 a nicol   Nov 2016 111012 Posts First prime before & after a factorial is a prime distance away? Excluding a gap of one, it seems that the first prime before and after a factorial is always a prime distance away. For instance: 5! = 120, the next prime after is 127, this is 7 away, which is also prime. This conjecture is unproven. So far it has been tested true up to 4000! for positive and 1000! for negative. This does not apply to 2^n - the first prime after 2^n is not always a prime distance away. Why the difference? Data: a(n) = p-n!, where p is the smallest prime > n!+1. https://oeis.org/A037153
 2021-03-02, 15:49 #2 Gelly     May 2020 5×7 Posts If it's not a prime distance away, it would have to be at least (n+1)^2. Otherwise, n!+d will be divisible by the smallest prime factor of d, since the smallest prime factor of d will be smaller than n and, trivially, divide into n!. The merit of a prime gap this size would be at least (n+1)^2 / ln(n!), or something like n/(ln(n)-1), which gets larger as n gets bigger. The largest prime gap merit ever found is 38.07, so for n = 150 and bigger, finding an example of a non-prime distance away from a factorial being the first prime would lead to record-breaking prime gap merits. It's hyper-unlikely (and likely conjecturable) that an example of a non-prime gap away from a factorial being the first prime does not exist.
 2021-03-02, 16:50 #3 Dr Sardonicus     Feb 2017 Nowhere 10001011100102 Posts Let n > 2, and let Q be the largest prime less than n!. Let k be the least integer greater than 1 for which n! + k is prime. Clearly k can be composed only of prime factors greater than n. If p is the least prime greater than n, the smallest composite k composed of primes greater than n is p^2. So for k to be composite, the gap between Q and the next prime is at least p^2 > n^2. Now log(n!) = n*log(n) apprixomately, so n = log(n!)/loglog(n!) approximately, so p^2 = log^2(Q)/loglog^2(Q), approximately. This would be (to say the least) unusually large for a gap between Q and the next prime, though not beyond the "infinitely often" size conjectured by Granville.
 2021-03-02, 17:27 #4 a nicol   Nov 2016 1D16 Posts There are no primes in the range [n!+2, n!+n] ? Last fiddled with by a nicol on 2021-03-02 at 17:57
2021-03-02, 20:32   #5
R. Gerbicz

"Robert Gerbicz"
Oct 2005
Hungary

2·36 Posts

Quote:
 Originally Posted by Dr Sardonicus p^2 = log^2(Q)/loglog^2(Q), approximately. This would be (to say the least) unusually large for a gap between Q and the next prime, though not beyond the "infinitely often" size conjectured by Granville.
Very standard heuristic idea gives that we are expecting very few [maybe zero] composites for G=nextprime(n!)-n! [if we exclude the G<2 cases].

As you noted to find composite G we need G>n^2 so the [n!+1,n!+n^2] interval contains only composites. A random number near x is composite with 1-1/log(x) probability, so using log(n!)~n*log(n) we get composite G with at most (1-1/(n*log(n)))^(n^2) probability, that is approx. exp(-1/log(n)^2)
and the sum of these is convergent [elementary way: for fixed K sum of these in the exp(K)<n<exp(K+1) interval, giving that the sum of these is <sum(exp(K-K^2)) what is clearly a convergent serie.]

Last fiddled with by R. Gerbicz on 2021-03-02 at 20:36 Reason: typo

 2021-03-03, 14:19 #6 a nicol   Nov 2016 111012 Posts Line graphs of A037153 in order and ascending numerical order: https://oeis.org/A037153/a037153_1.png Attached Thumbnails
2021-03-23, 05:21   #7
LaurV
Romulan Interpreter

Jun 2011
Thailand

3×55 Posts

Quote:
 Originally Posted by a nicol There are no primes in the range [n!+2, n!+n] ?
Nope. Any number of the form n!$$\pm$$x with x in [2..n] is divisible by x (because n! contains x as a factor). So, if none of the n!-1 and n!+1 is prime, then there are no primes in [n!-n, n!+n].

 2021-03-24, 07:09 #8 SethTro     "Seth" Apr 2019 269 Posts These properties are used by the prime gap search. Also true of primorials, for P# if P# +-1 are not prime then there are no primes in [P#-P, P#+P] For P#/2 if P# +- 2^n are not prime then there are no primes in [P#-2P, P#+2P] Last fiddled with by Dr Sardonicus on 2021-03-24 at 14:50 Reason: Insert omitted word

 Similar Threads Thread Thread Starter Forum Replies Last Post Hugo1177 Miscellaneous Math 1 2021-01-05 08:09 Kebbaj Information & Answers 9 2019-10-06 08:16 rogue Lounge 8 2012-03-02 16:41 axn Computer Science & Computational Number Theory 66 2011-09-01 21:55 cheesehead Science & Technology 3 2008-11-04 19:55

All times are UTC. The time now is 20:09.

Sat Apr 17 20:09:33 UTC 2021 up 9 days, 14:50, 0 users, load averages: 1.25, 1.54, 1.68