Interesting pattern in plot involving prime numbers If we plot $f(n) = \dfrac{n+1}{p_{n+1}} - \dfrac{n}{p_n}, n \in \mathbb{N} $, we get an interesting pattern.

Questions:

*

*Why it looks like there's different lines on plot?


*Why they have such shape?


*How those lines can be approximated?


*Why there's like peak at $n \approx 500$?


*Why points in lines become sparcer as they are closer to the bottom?

As Vepir suggested in his comment, the curves correspond to consecutive primes with different prime gaps. The one on the top, for example, correspond to pairs of twin primes. That is $$\frac{n+1}{p_{n+1}}-\frac{n}{p_n} = \frac{n+1}{p_{n}+2}-\frac{n}{p_n}$$
The curves can be approximated using the known approximation for the $n$-th prime. For example, we know that $p_n \approx n\,(\log n + \log\log n -1)$.
Here's how it looks that approximation for the curve on the top.

The curves on the bottom corresponds to pairs of consecutive with larger prime gaps, that naturally occur less frequently.
