# Why does a non-zero density function not imply infinitude of what it measures?

Consider the following density function for the twin primes:

Numbers $x-2$, $x-4$ are twin primes iff:

$x \ne 2,4 \ mod \ 2$
$x \ne 2,4 \ mod \ 3$
$x \ne 2,4 \ mod \ 5$
$x \ne 2,4 \ mod \ 7$
... $x \ne 2,4 \ mod \ max prime < x-2$

Intuitively given this definition the rough frequency of twin prime pairs around a number N would be:

$(1 - \frac{1}{2})(1 - \frac{2}{3})(1 - \frac{2}{5})...(1 - \frac{2}{p})$

$= (\frac{1}{2})(\frac{1}{3})(\frac{3}{5})...(\frac{p-2}{p})$

if p is the largest prime less than N.

Since we know there are infinitely prime numbers we know that for any positive integer N this "density" will never be 0 and therefore the density of twin primes with respect to the natural numbers will always be greater than 0. Does this not imply that there must be infinitely many twin primes? What am I missing here?

-
This are several issues with your logic. Consider the sequence of positive integers. We can show that the number $1$ appears with density $\frac{1}{N}$ (for the first $N$ integers). This Bayesian probability (as opposed to frequentist) is never 0, yet the number 1 only appears a finite number of times. –  Calvin Lin Jul 1 '13 at 2:09
One can make estimates as to the number of twin pairs $(p,p+2)$ with $p\le x$ one would expect if primes in an interval $(1,n)$ were randomly chosen with the right density. However, the primes are not obtained by tossing a coin, they are a completely determined definite set. –  André Nicolas Jul 1 '13 at 2:13

1. You need to use the observed / incidence count, instead of the probabilistic count. For example, you cannot argue that "Since $3 < 10$ and there are 4 primes less than 10, hence $3$ is a prime with probability $\frac{4}{10}$. No, in this case, it is either a prime, or it is not a prime.
2. Just because the incidence probability is non-zero for all $N$, merely tells you that at least 1 example exists. For example, consider the incidence probability that a number is $1$. This probability is $\frac{1}{N}$, which is non-zero, yet the number 1 only occurs a finite number of times.
3. To begin to show that there are infinitely many such incidences, you need to show that it must appear within a certain interval. This requires you to know the incidence probability. For example, we know (from the prime number theorem) that there is a proportion $x(n)$ of primes that are less than $n!+n$. What is the probability that there are primes in the range $n!+1$ to $n!+n$? It is either 0 or 1, and is independent of $x$. This has nothing to do with the incidence probability.