20210302, 13:40  #1 
Nov 2016
29 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) = pn!, where p is the smallest prime > n!+1. https://oeis.org/A037153 
20210302, 15:49  #2 
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 nonprime distance away from a factorial being the first prime would lead to recordbreaking prime gap merits. It's hyperunlikely (and likely conjecturable) that an example of a nonprime gap away from a factorial being the first prime does not exist. 
20210302, 16:50  #3 
Feb 2017
Nowhere
2·7·11·29 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. 
20210302, 17:27  #4 
Nov 2016
29 Posts 
There are no primes in the range [n!+2, n!+n] ?
Last fiddled with by a nicol on 20210302 at 17:57 
20210302, 20:32  #5  
"Robert Gerbicz"
Oct 2005
Hungary
2×3^{6} Posts 
Quote:
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 11/log(x) probability, so using log(n!)~n*log(n) we get composite G with at most (11/(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(KK^2)) what is clearly a convergent serie.] Last fiddled with by R. Gerbicz on 20210302 at 20:36 Reason: typo 

20210303, 14:19  #6 
Nov 2016
1D_{16} Posts 
Line graphs of A037153 in order and ascending numerical order:
https://oeis.org/A037153/a037153_1.png 
20210323, 05:21  #7 
Romulan Interpreter
Jun 2011
Thailand
3·5^{5} Posts 

20210324, 07:09  #8 
"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 20210324 at 14:50 Reason: Insert omitted word 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Primes of the form prime(a)+prime(b)+1=prime(c) and prime(b)prime(a)1=prime (c)  Hugo1177  Miscellaneous Math  1  20210105 08:09 
The Factorial 94550! 1 Prime will cam out l from the list 5000  Kebbaj  Information & Answers  9  20191006 08:16 
World Record Factorial Prime Found  rogue  Lounge  8  20120302 16:41 
Factorial modulo a prime  axn  Computer Science & Computational Number Theory  66  20110901 21:55 
Duplicating Your Housekeys, From a Distance  cheesehead  Science & Technology  3  20081104 19:55 