The Prime Number Theorem: The ratio of the number of primes not
exceeding
x
and
x
/
ln
x
approaches 1 as
x
grows without bound.
(Here ln
x
is the natural logarithm of
x
)
Note that ln
x
= 2[(
x
−
1
x
+1
) +
1
3
(
x
−
1
x
+1
)
3
+
1
5
(
x
−
1
x
+1
)
5
+
···
] for
x
>
0
Compute lnx
using the series above as far as you can without getting
overflow issues and use it to estimate the number of primes based on
the Theorem above
exceeding
x
and
x
/
ln
x
approaches 1 as
x
grows without bound.
(Here ln
x
is the natural logarithm of
x
)
Note that ln
x
= 2[(
x
−
1
x
+1
) +
1
3
(
x
−
1
x
+1
)
3
+
1
5
(
x
−
1
x
+1
)
5
+
···
] for
x
>
0
Compute lnx
using the series above as far as you can without getting
overflow issues and use it to estimate the number of primes based on
the Theorem above