Prime Line Cover
Exact minimum line cover · OEIS A373813
N = 1024 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 = 1024 — which requires exactly 143 lines.
This solver
22 min
@ N = 861
Prior MIP record
282 hrs
@ N = 861
Primary Solver File
primecover1024.cpp ↗ Article
C++23 · parallel branch‑and‑bound · bitmask for N ≤ 1024
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

Download and compile the exact solver that certified f(1024) = 143 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
750×
Speedup
f(1024) = 143
World record
< 40 hrs
complete N = 1–1024 sweep
Variants
primecover1024.cpp Primary primecover1024_line_coordinates.cpp

primecover1024_line_coordinates.cpp is the same exact solver — 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 primecover1024.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/primecover1024.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.