
It turns out that the density of primes is such that

the number of primes below some number X

is proportional to X divided by the natural log of X.

So this is log base E.

And I won't attempt to prove this.

I'll resort to proof by intimidation.

This was conjectured by Gauss and then Legendre

and proven later.

And that means that the probabilityif we pick some random number,

the probability that that number is prime

is approximately 1 over the natural log of X.

So the question is: how many guesses do we expect to need

to find a prime number that's around 100 decimal digits long?

And in computing this, you should assume that this probability

that a random X is prime is equal to 1 over the natural log of X

even though this is an approximation.