"It is evident that the primes are randomly distributed but, unfortunately, we don't know what 'random' means."
The prime number theorem says that at n, the number of primes upto n is (approx.) (n/logn). Formally:
P(n)≡∣{p prime :2≤p≤n}∣∼lognn
Consider sieving. In the beginning, everything is potentially prime.
When we remove the multiples of a prime p, we decrease the density of potential primes.
As we remove 1/p of the remaining potential primes (eg. removing 2 drops density of potential primes by half. Sieving by 3reduces the density by one-third).
See that the reduction is additive not multiplicative . That is, upon removing the 5, we lose 1/5 of our potential primes, so the new density is D2 = D - D/5. Said differently, we have 4/5th the number of potential primes we used to have, so D2 = 4D/5.
Furthermore, removing 5 only begins to affect the density of primes after 5*5 = 25, since smaller multiples of 5 ( 5*1, 5*2, 5*3, 5*4) have been removed at earlier iterations of the sieve (on sieving 5, 2, 3, and 2, respectively).
In general: On removing a prime p, Our new density becomes D2 = D - D/p which is (1-1/p)D.
In general: On removing a prime p, the density till p*p remains untouched. Density after p*p is multiplicatively scaled by (p-1)/p.
Define a function f(x) which estimates density of primes around x.
We consider the effect of the primes in the interval A≡[x,x+dx] on the interval B≡[x2,(x+dx)2]
Each prime p in interval A decreases the density of primes in interval B by subtracting f(x2)/p, since we lose those many primes. Since each number in [x,x+dx] is basically x, we approximate this subtraction to f(x2)/x.
In interval A, there are f(x)dx primes.
f((x+dx)2)==f(x2)−killing of from primes in x=f(x2)−p∈[x,x+dx]∑[Prob(p prime)]⋅f(x2)/p=f(x2)−p∈[x,x+dx]∑[f(p)]⋅f(x2)/p=(p∼x in [x,x+dx]):=f(x2)−length([x,x+dx])⋅[f(x)]⋅f(x2)/p=f(x2)−(dx)f(x)⋅f(x2)/xf((x+dx)2)=f(x2)−f(x2)f(x)dx/xf((x+dx)2)−f(x2)=−xf(x2)f(x)dx
So the density of primes around f(u) is 1/ln(u). So upto n, the number of primes is ∫0nf(x)dx which is ∫0n1/ln(x)dx, bounded by n/ln(n).
This "proves" the prime number theorem.