where
is the prime counting function (number of prime numbers
), and
is the natural logarithm of x. The convergence of the abovementioned limit, first conjectured by Legendre in 1798, is now well established.
In this exercise we are more concerned with the difference function Δ, defined as follows:
where the symbol
means rounding-off to nearest integer. Δ appears divergent and seems to increase without bound as x increases.
Given a number d, our goal is to find the value of integer x when
first exceeds d.
As an example, if
, the value of x is
since:
and for all
,
.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers6
Suggested Problems
-
Find the sum of all the numbers of the input vector
54523 Solvers
-
5081 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1316 Solvers
-
97 Solvers
-
Replace secondary diagonal elements of a square array
186 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!