A notorious question with prime numbers is estimating the gaps between consecutive primes. That is, if $(p_n)_{n \geq 1}$ is the canonical enumeration of the primes, then set $g_n = p_{n+1} - p_n$. It is shown that $g_n > \frac{c \log(n) \log \log(n) \log \log \log \log(n)}{(\log \log \log(n))^2}$ infinitely often, but a precise estimate is not known.

My question is, is there a 'natural' superset of the primes that are of interest (say, the set of numbers that are either primes or product of two primes) such that the gap between consecutive members is well known or well estimated?

  • $\begingroup$ Considering only odd primes. Odd numbers have small gaps, all equal $2.$ $\endgroup$ Feb 8 '11 at 21:54
  • $\begingroup$ It is not quite clear to me what you are looking for (and even if it were chances are I could not answer). Still, a small remark in the hope it is relevant: If you restrict the number of prime factors, say by $k$, you will get about $(x/log x) (\log \log x)^{k-1}$ elements below $x$. So, the gaps on avarage cannot be too small, roughly I guess also some $\log x$ times some quotient of iterate $\log$ factors. On the other hand there will be small gaps too. Thus, the gaps will remain quite non-uniform in size. $\endgroup$
    – user9072
    Feb 9 '11 at 0:35
  • $\begingroup$ I wouldn't be that surprised that the set of integers where the Von Mangoldt function doesn't vanish (hence the union of primes and prime powers) behaves the way you want. $\endgroup$ Dec 26 '17 at 21:45
  • 1
    $\begingroup$ There are bounds on the gap between numbers that are the sum of two squares (this is a natural superset of the primes congruent to 1 modulo 4). $\endgroup$ Dec 27 '17 at 16:15

Let $q_n$ denote the $n^{\text{th}}$ number that is a product of exactly two distinct primes. It is known that $$\liminf_{n\to \infty} \ (q_{n+1}-q_n) \le 6.$$ This is a result of Goldston, Graham, Pintz, and Yildirim.


  • $\begingroup$ Are there any known non-trivial upper bounds? $\endgroup$ Feb 8 '11 at 22:28
  • 5
    $\begingroup$ There's also Chen's theorem saying infinitely often that $p+2$ is a product of at most two primes, for $p$ prime. $\endgroup$
    – Matt Young
    Feb 8 '11 at 22:31
  • 1
    $\begingroup$ $\limsup_{n\to \infty} \ (q_{n+1}-q_n) = \infty$ and that remains true even if you look at numbers with no more than 20 distinct factors (Pretty much like the fact that there are large prime gaps, just use the Chinese Remainder Theorem ). You might hope for results on the average although it would have to cover long intervals (pretty much like with primes) $\endgroup$ Feb 9 '11 at 3:15

How about practical numbers?

They aren't a superset of primes, but they are a "notion of 'almost primes'" as the title requests.

Hausman and Shapiro showed in 1984 that practical number gaps satisfy $\frak{g}$$_n < 2 \cdot \frak{p}$$_n^\frac{1}{2} + 1$. On the other hand, for primes, the best known bound is the Baker-Harman-Pintz or BHP bound published in 2000: $g_n \in p_n^{0.525} + O(1)$. Conditional on the Riemann hypothesis we have $g_n \in p_n^{\frac{1}{2}+o(1)}$, but not $g_n \in O(p_n^\frac{1}{2})$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.