# Number of primes in sets of $k$ positive integers

Consider the set of $$k$$ numbers $$\{n+c_1,n+c_2,n+c_3,...,n+c_k\}$$ where $$c_i$$ are constant positive integers and $$n$$ is a varying positive integer such that $$n \leqslant M$$. What is the probability that there are $$x$$ numbers in this set which are prime, where $$0 \leqslant x \leqslant k$$ ? If this is really hard, is there any answer to cases such as $$x=0$$ and $$x=1$$ ?

At $$k=1$$, we have to consider whether $$n+c_1$$ is prime or composite. We know that $$M < n+c_1 \leqslant M+c_1$$. Thus, our probability $$P(k,M,c_i)$$ would be: $$P(1,M,c_1) = \frac{\pi(M+c_1)-\pi(M)}{c_1} \sim \frac{(M+c_1)\ln M-M\ln(M+c_1)}{c_1 \ln M \ln(M+c_1)}$$

Is the working for $$k=1$$ right? Can I directly apply Prime Number Theorem for $$k \geqslant 2$$ in a similar fashion. I am doubtful as we are dealing with a group of equally interspaced numbers. Any help or ideas are accepted. Thanks in advance!

• Probability wrt what probability distribution on $n$ ? The uniform distribution ? Then it is a matter of counting some particular $l$-uples of primes $\le M$ – reuns Jan 8 at 8:13

## 1 Answer

It's a well known fact that the average distance between primes about as large as $$n$$ is $$\ln n$$. So the probability for a number as large as $$n$$ to be prime is about $$1/\ln n$$.

Probability that your $$k$$-th number is prime is therefore:

$$p_k=\frac{1}{\ln (n+c_k)}$$

Probability that your $$k$$-th number is not prime is:

$$\bar{p}_k=1-\frac{1}{\ln (n+c_k)}$$

For $$x=0$$ all numbers must be composite so the probability is:

$$P=\prod_{i=1}^k \bar{p}_i$$

For $$x=1$$, exactly one number has to be prime so the probability is:

$$P=p_1\bar{p}_2\bar{p}_3\dots\bar{p}_k+\bar{p}_1{p}_2\bar{p}_3\dots\bar{p}_k+\dots+\bar{p}_1\bar{p}_2\bar{p}_3\dots{p}_k$$

It's a little bit more difficult to calculate probability for $$x>1$$ but it's still a fairly straightforward task.

• This is exactly what I had initially done. But can the prime number theorem directly be applied for this question? We are dealing with a group of numbers with constant distance between them. – Haran Jan 8 at 12:59
• This might work as a heuristic/rule of thumb, but not more strictly: the probabilities are not independent and thus cannot be plainly multiplied together. – Mees de Vries Jan 8 at 13:11
• In particular, if $k = 2, c_2 = c_1 + 2, x = 2$, the twin prime conjecture essentially asks, "is there $c_1$ such that for any $M$ the probability equals 0". – Mees de Vries Jan 8 at 13:15