A *prime gap* $g(n)$ between two consecutive primes is defined as

$$g(n)=p_{n+1}-p_n$$

where $p_n$ is the $n$th prime number. An interesting property of prime gaps is that the “spikes” of its plot occurs at multiples of $6$. From its graph, it seems very improbable that a continuous function could approximate. Some formulas for prime numbers are known (they are not exact) are known (there is a whole wikipedia article on them) and some approximations for the prime counting function are known, but my question is:

What are some approximations for $g(n)$?

An approximation in terms of continuous functions isn’t necessary (such a formula is highly improbable); an approximation in terms of other discontinuous functions might also help.