TOPICS
Search

Prime Distance


PrimeDistance

The prime distance pd(n) of a nonnegative integer n is the absolute difference between n and its nearest prime. In particular, pd(p)=0 for primes p. For n=0, 1, 2, ..., the values begin 2, 1, 0, 0, 1, 0, 1, 0, 1, 2, ... (OEIS A051699). The least nonnegative integers n with prime distances 0, 1, 2, 3, ... are 2, 1, 0, 26, 93, 118, 119, 120, 531, 532, 897, ... (OEIS A077019).


See also

Nearest Prime, Prime Difference Function, Prime Gaps

Explore with Wolfram|Alpha

References

Sloane, N. J. A. Sequences A051699 and A077019 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Prime Distance

Cite this as:

Weisstein, Eric W. "Prime Distance." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/PrimeDistance.html

Subject classifications