The following heuristic argument for the prime number theorem was taken from https://sites.williams.edu/Morgan/2008/10/11/heuristic-derivation-of-prime-number-theorem/. Frank Morgan attributes it to Hugh Bray via Greg Martin.
Suppose that there is a nice probability function $P(x)$ that a large integer $x$ is prime. As $x$ increases by $\Delta x = 1$, the new potential divisor $x$ is prime with probability $P(x)$ and divides future numbers with probability $1/x$. Hence $P$ gets multiplied by $(1-P/x)$, $\Delta P = -P^2/x$, or roughly $$P' = -P^2/x.$$ The general solution to this differential equation is $P(x) = 1/\log(cx)$.
I don't understand why $P$ gets multiplied by $(1-P/x)$. The argument seems to be saying (correct me if I am wrong), that $$P(x+1) = \left(1-\frac{P(x)}{x}\right)P(x).$$
I don't quite understand why this is so, even heuristically.
$P(x)$ is the probability that $x$ has no prime divisor $p<x$. In this heuristic scenario, "is divisible by $p$" is smeared uniformly across all numbers so that each number has probability $\frac1p$ of being a multiple of $p$. Also, divisibilities by distinct primes are independent. Therefore $P(x)$ is also the probability that $n$ has no prime divisor $<x$ for arbitrary $n$. Now $x+1$ is prime if it has no prime divisor $<x+1$, i.e., if it has no prime divisor $<x$ and $x$ is also no prime divisor.${}^1$ If $x$ is prime, then the last divisibility condition is independent and we obtain $$\begin{align}P(x+1)&=P(x+1\text{ has no prime div. }<x)\cdot P(x\text{ is no prime div.}) \\ &=P(x)\cdot (1-P(x\text{ is a prime div. of }x+1))\\ &=P(x)\cdot(1-P(x\text{ is prime}))\cdot P(x\text{ divides }x+1))\\ &=P(x)\cdot(1-P(x)\cdot\tfrac1x) \end{align}$$
${}^1$ Don't complain that $x$ cannot be a divisor of $x+1$ anyway - instead recall that we "smeared" divisibility!