TITLE: Probabilistic interpretation of prime number theorem
QUESTION [10 upvotes]: Suppose there is a function $f(x)$ which is the "probability" that the integer $x$ is prime. The integer $x$ is prime with probability $f(x)$, and then divides the larger integers with probability $1/x$; so as $x$ changes from $x$ to $x+1$, $f(x)$ changes to (roughly)
$$f(x)\left(1-f(x)/{x} \right).$$
How do I show that? I can go on to show
$$\frac{df}{dx}  + \frac{f^2}{x}=0$$
and thus $\frac{1}{\log{x}} + c$ is solution but I can't show that step on how $f(x)$ changes. please advise

REPLY [2 votes]: Another way to obtain OP's differential equation is as follows:
$$f(x) \approx \prod_{p < x} \left( 1-1/p \right) \approx \exp( - \sum_{p<x} 1/p) \approx \exp( -\int_{1}^{x} \frac{f(t) dt}{t}).$$
Taking logarithms and differentiating w.r.t $x$, we obtain the desired ODE (of course, the argument is completely informal).