Functions for estimating
prime_count(n, upper_bound)nth_prime_estimate(n, upper_bound)
an integer. See Details for more information.
a logical indicating whether to estimate the lower- or upper bound.
Paul Egeler, MS
The prime_count
function estimates the number of primes upper_bound = FALSE
, it is guaranteed to under-estimate for all
upper_bound = TRUE
, it holds for all positive
The nth_prime_estimate
function brackets upper and lower bound values of
the nth prime. It is valid for
The methods of estimation used here are a few of many alternatives. For further information, the reader is directed to the References section.
"Prime-counting function" (2020) Wikipedia. https://en.wikipedia.org/wiki/Prime-counting_function#Inequalities (Accessed 26 Jul 2020).