# Is every prime the largest prime factor in some prime gap?

Definition: In the gap between any two consecutive odd primes we have one or more composite numbers. One of these composite number will have a prime factor which is greater than that of any other number in the gap. E.g. $$43$$ is the largest prime in the gap between the consecutive primes $$83$$ and $$89$$. I am interested in the largest prime factor in the gap between two consecutive primes.

Claim: Every prime is the largest prime factor in some prime gap.

I am looking for a proof or disproof.

Update, 21 Dec 2019: Conjecture verified for $$p \le 10^{10}.$$

• I think either a proof or disproof is well beyond what we know how to do, so as stated the problem is more or less unanswerable. – Stanley Yao Xiao Dec 7 '19 at 18:07
• oeis.org/A052248 – R Hahn Dec 8 '19 at 8:16
• The first occurrence of a given prime $p$ in the oeis sequence seems to be at position $r$ such that $\sqrt{r}\log^2 r\approx p$. Maybe a connection with RH is possible. – Sylvain JULIEN Dec 8 '19 at 17:27
• @Sylvain if $p$ is a prime such that the next prime, $q$, after $2p$ is smaller than twice the next prime after $p$, then $p$ is the largest prime factor in the gap between $q$ and the prime previous to $q$. This is the case for many primes, in particular, for all primes through $p=53$. This may explain what you've seen. But for $p=59$, the next prime after $2p=118$ is $127$, which exceeds $2\times61=122$, so we have to go farther, in fact, quite a bit farther, to find the gap for $59$. And it's unlikely that $59$ disproves RH. – Gerry Myerson Dec 9 '19 at 2:20
• @GerryMyerson For $59$ we have to go all the way up to the gap between the primes $59*18-1 =1061$ and $59*18+1 = 1063$. The farthest multiple of $p$ we have to go for any prime $p \le 3 \times 10^9$ is for $p = 2739366569$ where we need to go all the way up to $819$ times $p$. – Nilotpal Kanti Sinha Dec 9 '19 at 3:05

Heuristically this should be the case. For any prime p greater than 5, consider the set of numbers of the form $$2^a3^b5^c p \pm 1$$. The "probability" that one of of these is prime should be about $$\frac{1}{\log (2^a 3^b 5^c)} = \frac{1}{a \log 2 + b \log 3 + c \log 5} .$$ So the probability that both $$2^a3^b5^c p + 1$$ and $$2^a3^b5^c p - 1$$ are prime should be about $$\frac{1}{\left(a \log 2 + b \log 3 + c \log 5\right)^2}.$$ Now, note that the product $$\prod_{a,b,c} \left(1-\frac{1}{\left(a \log 2 + b \log 3 + c \log 5\right)^2}\right)$$ diverges to $$0$$, it represents the probability that none of those $$2^a3^b5^c p \pm 1$$ is a prime pair. So we should expect for a given $$p$$ there should be such an $$a$$,$$b$$ and $$c$$. So after noting the twin prime pairs $$(3,5)$$, $$(5,7)$$ and $$(29,31)$$ it seems like we should expect a much stronger statement. For any prime $$p$$, there should be a positive integer $$n$$ such that $$p$$ is the largest prime divisor of $$n$$ and $$n+1$$ and $$n-1$$ are both prime.

Obviously, proving something like this is well beyond current technology. I'd also say that it is highly likely that even your weaker statement is well beyond what is currently doable.

• This stronger version of the conjecture has been verified for primes upto $5 \times 10^8$. The reason I did not post this stronger version is because it is a conjecture which depends on another conjecture i.e. the conjecture depends on the twin prime conjecture being true in the first place. – Nilotpal Kanti Sinha Dec 9 '19 at 2:39
• @NilotpalKantiSinha If your hope is to make something weak enough that we can prove it now, I think you are going to need to make a much weaker statement. The following might be doable: There is a constant a>0, such that every prime $p$ occurring in a prime gap where there are at most a^p prime divisors in that gap larger than p. That might be doable with some variant of the Maynard-Tao machinery? – JoshuaZ Dec 9 '19 at 2:45
• I agree with JoshuaZ using the random model for the primes is the first thing to do for all those kind of problems. – reuns Dec 10 '19 at 2:59

Extra long comment sharing data as requested by @GerhardPaseman

Here is the data for all primes $$\le 16290041$$. The way to read this data is as follows: Taking the first row as an example, of the $$1048575$$ primes $$\le 16290041$$, there are exactly $$774792$$ primes $$p$$ such that the integer $$2p$$ causes the largest prime factor in the prime gap containing it to be $$p$$, i.e. nearly $$74\%$$ of the times. And so on for the rest of the rows.

This nearly $$26\%$$ of the times we need a multiple $$k > 2$$.