TITLE: Are there any notion of 'almost primes' known to have small gaps?
QUESTION [12 upvotes]: 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?

REPLY [5 votes]: 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})$.