mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2021-03-02, 13:40   #1
a nicol
 
Nov 2016

29 Posts
Default 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
a nicol is offline   Reply With Quote
Old 2021-03-02, 15:49   #2
Gelly
 
Gelly's Avatar
 
May 2020

5·7 Posts
Default

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.
Gelly is offline   Reply With Quote
Old 2021-03-02, 16:50   #3
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

2·7·11·29 Posts
Default

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.
Dr Sardonicus is offline   Reply With Quote
Old 2021-03-02, 17:27   #4
a nicol
 
Nov 2016

29 Posts
Default

There are no primes in the range [n!+2, n!+n] ?

Last fiddled with by a nicol on 2021-03-02 at 17:57
a nicol is offline   Reply With Quote
Old 2021-03-02, 20:32   #5
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

2×36 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
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
R. Gerbicz is offline   Reply With Quote
Old 2021-03-03, 14:19   #6
a nicol
 
Nov 2016

1D16 Posts
Default

Line graphs of A037153 in order and ascending numerical order:

https://oeis.org/A037153/a037153_1.png
Attached Thumbnails
Click image for larger version

Name:	a037153_1.png
Views:	33
Size:	239.3 KB
ID:	24439  
a nicol is offline   Reply With Quote
Old 2021-03-23, 05:21   #7
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

3·55 Posts
Default

Quote:
Originally Posted by a nicol View Post
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].
LaurV is offline   Reply With Quote
Old 2021-03-24, 07:09   #8
SethTro
 
SethTro's Avatar
 
"Seth"
Apr 2019

269 Posts
Default

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
SethTro is online now   Reply With Quote
Reply

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 2021-01-05 08:09
The Factorial 94550! -1 Prime will cam out l from the list 5000 Kebbaj Information & Answers 9 2019-10-06 08:16
World Record Factorial Prime Found rogue Lounge 8 2012-03-02 16:41
Factorial modulo a prime axn Computer Science & Computational Number Theory 66 2011-09-01 21:55
Duplicating Your Housekeys, From a Distance cheesehead Science & Technology 3 2008-11-04 19:55

All times are UTC. The time now is 19:43.

Sat Apr 17 19:43:34 UTC 2021 up 9 days, 14:24, 0 users, load averages: 1.61, 1.65, 1.66

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.