Prime Line Cover
Exact minimum line cover · OEIS A373813
N = 1814 certified
Plot the first N primes as points — the 1st prime at (1, 2), the 2nd at (2, 3), and so on. How few straight lines does it take to touch every point? The C++ solver behind this demo holds the certified world record for the exact answer, currently at N = 1814 — which requires exactly 229 lines.
This solver
22 min
@ N = 861
Prior MIP record
282 hrs
@ N = 861
Primary Solver File
↓primecover2048_line_coordinates.cpp ↗ Article
C++23 · parallel branch‑and‑bound · bitmask for N ≤ 2048
Legend
Heavy line (≥ 3 pts)
Light line (1–2 pts)
Prime point (i, pi)
Glow scales with line density
Slow 3.00 s Fast
[Initialising…]
Minimum Line Cover of Prime Points
Exact solver for OEIS A373813 — visualised live
N — Prime Index
0
pN — Prime Value
—
f(N) — Minimum Lines
0
Solve Duration
—
Heavy lines (≥ 3 pts) 0
Max collinear pts —
Awkward primes seen 0
Slow 3.00 s Fast
[Initialising…]
f(N) — optimal lines required
Compute time per step
Preprint · April 2026
An Exact Solver for the Minimum Line Cover of Prime-Indexed Points
Jesper Gran Mikkelsen · Norway
Read Paper — PDF Supplement · Extending to N = 1814

Download and compile the exact solver that certified f(1814) = 229 as a new world record. This page runs a faithful JavaScript translation — fast enough to explore, not to certify.

This solver · N = 861
22 min
purpose-built exact solver · c4d-highcpu-8
Prior solver · N = 861
282 hrs
Mixed-Integer Programming (MIP) solver
744×
Speedup
f(1814) = 229
World record
462 hrs
complete N = 1–1814 sweep
Variants
↓ primecover2048_line_coordinates.cpp Primary ↓ primecover1024_line_coordinates.cpp ↓ primecover1024.cpp

primecover2048_line_coordinates.cpp is the build that certified the record — it widens the bitmask to 2048 bits and writes out the coordinates of every line in the optimal cover and the prime points each line passes through, enabling full reproducibility and visualisation. The primecover1024 pair is the 1024-bit build it was forked from; the algorithm is unchanged. — it additionally writes out the coordinates of every line in the optimal cover and the prime points each line passes through, enabling full reproducibility and visualisation.

Results
▶Quick Start — Run the C++ Solver
1
Get WSL (Windows Subsystem for Linux)

Open PowerShell as Administrator — right-click the Start button → Terminal (Admin) — and run:

PowerShell
wsl --install

Restart when prompted, then open the Ubuntu app from the Start menu to complete first-time setup.

2
Install GCC 14

The solver uses C++23 features that only GCC 14 and newer support. Ubuntu doesn't ship it by default — paste all three commands at once and they'll run in sequence:

Ubuntu (WSL)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install g++-14 -y
3
Copy, compile, and run

Download primecover2048_line_coordinates.cpp and save it somewhere on your PC — Downloads or Desktop works. Click the edit button (✎) below and paste the full path to the file. The command updates instantly:

Ubuntu (WSL)
cp /mnt/c/path/to/primecover2048_line_coordinates.cpp ~/solver.cpp && \
g++-14 -std=c++23 -O3 -march=native -pthread -fno-exceptions -fno-rtti \
  solver.cpp -o solver && \
./solver
Paste your file path
Works with Windows paths (C:\…) and WSL paths (/mnt/c/…)

Output begins printing after ~15 seconds of compilation.