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