# Are there any notion of 'almost primes' known to have small gaps?

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?

• Considering only odd primes. Odd numbers have small gaps, all equal $2.$ Feb 8 '11 at 21:54
• 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.
– user9072
Feb 9 '11 at 0:35
• 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. Dec 26 '17 at 21:45
• 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). Dec 27 '17 at 16:15

## 2 Answers

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.

http://arxiv.org/abs/math/0609615

• Are there any known non-trivial upper bounds? Feb 8 '11 at 22:28
• There's also Chen's theorem saying infinitely often that $p+2$ is a product of at most two primes, for $p$ prime. Feb 8 '11 at 22:31
• $\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) 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})$.