Instead of looking at the number of primes below X, we fix the number of primes P (say 10 or 100...) and then we look at how the length of the successive intervals having the same fixed number of primes P $$(a_{1},b_{1}),(a_{2},b_{2}),...(a_{n},b_{n})$$ changes.
Here, $$a_{i},b_{i}$$ are composite, first and last.
I tried to see if we can get an idea by using a table of the first 10,000 primes but it turned out that the sample is too small. But it showed that P should be much larger than 10 or 100 because of the fluctuations of the prime numbers. A much bigger number P will not be affected by these fluctuations. Unfortunately, I do not code so I won't be able to conduct these numerical experiments.
Can we find an approximate formula for these intervals? Suppose we find an exact closed form, will it not be a way to determine the next prime?