Asymptotically it depends on the radical of k: basically take
and compare for different k. So f(6) = 2 > 1 = f(8), so gaps of length 6 are asymptotically twice as common as gaps of length 8. (Obviously k needs to be even.)
You asked (in a comment) for a smooth envelope. Using Mertens' theorem and the Prime Number Theorem it can be shown that
and this bound is tight in the sense that there is some $\alpha$ with $f(k)>\alpha\log\log k$ for infinitely many $k$. (This can be computed without too much difficulty, if desired.)
You might notice that this does not resemble the curve you have drawn. This is the result of a number of separate factors:
- The envelope necessarily ignores low points, so only 2, 6, 30, ... are relevant.
- There is a discretization error such that the small members do not fit the curve very nicely. It works better for large k, say $k\ge 2\cdot3\cdot5\cdot7$. The error diminishes approximately as $O(1/\log\log k)$.
- Your graph uses a small number of prime gaps. This error decreases approximately as $O(k/\log x)$ where x is the number of prime gaps used. In particular, every time you double k you need to square the number of prime gaps used to keep the error roughly constant.