TOPICS
Search

Prime Line Cover


The prime line cover problem asks for the minimum number L(n) of straight lines whose union contains the first n points (k,p_k), where p_k is the kth prime number. The set of all such points is called the prime number graph (Pomerance 1979). For a finite set of points, using line segments gives the same minimum. This is an instance of the set cover problem, with each candidate line covering the points it contains.

For n=1, 2, ..., the values of L(n) begin 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, ... (OEIS A373813). Set L(0)=0. The value cannot decrease when a point is added, and at most one extra line is needed. A prime number p_n is called an awkward prime when L(n)=L(n-1)+1 (Numberphile 2026, Kominers et al. 2026). The first awkward primes are 2, 5, 13, 29, 59, 97, 103, ... (OEIS A393445). For example, the addition of p_(576)=4211 raises the minimum from 69 to 70.

Since each awkward prime accounts for exactly one increase, L(n) is also the number of awkward primes among the first n prime numbers. Kominers et al. (2026) obtain L(n)=O(n/logn) as a consequence of a stronger estimate using the error term in the prime number theorem. In particular, the sum of the reciprocals of the awkward primes converges.

If B(n) is the largest number of the first n points on a single line, then

 L(n)B(n)>=n.

Pomerance (1979) proved that the prime number graph contains arbitrarily large finite sets of collinear points. Kominers et al. (2026) give quantitative estimates for B(n) and stronger bounds under the Riemann hypothesis.

A related problem asks for the smallest terminal prime number of a line containing exactly n points of the prime number graph (Numberphile2 2026). The terminal prime is the largest p_k among those points, and the count is taken over the entire line. The minima for n=1, 2, ... begin 2, 3, 7, 23, 47, 181, 83, 73, ... (OEIS A376187), with -1 used if no such line exists.

For n=3, the line y=2x-1 contains (2,3), (3,5), and (4,7). The first point (1,2) lies off the line. For k>=5, p_k>2k-1 because p_5=11 and successive odd primes differ by at least 2. A terminal prime below 7 would require the first three points to be collinear. They are not, so the minimum terminal prime is 7.


See also

Collinear, Prime Number, Prime Number Theorem, Set Cover Problem

Explore with Wolfram|Alpha

References

Kominers, S. D.; Mrazović, R.; Pomerance, C.; and Solé, P. "Lines in the Prime Number Graph." 1 Jun 2026. https://arxiv.org/abs/2605.22752.Numberphile. "Awkward Primes." Featuring N. J. A. Sloane. Apr. 7, 2026. https://www.youtube.com/watch?v=VFoIPlUalRY.Numberphile2. "Prime at the End of the Line (Extra)." Featuring N. J. A. Sloane. Apr. 8, 2026. https://www.youtube.com/watch?v=u-_8wX4cECo.Pomerance, C. "The Prime Number Graph." Math. Comput. 33, 399-408, 1979. https://doi.org/10.1090/S0025-5718-1979-0514836-7.Sloane, N. J. A. Sequences A373813, A376187, and A393445 in "The On-Line Encyclopedia of Integer Sequences."

Cite this as:

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

Subject classifications