All projects

Computational search · Completed

cunningham-chain-search

A CUDA and GMP pipeline for searching long first-kind Cunningham chains, with interactive analysis tools and retained failed experiments.

At a glance

Evidence and scope

Repository measurements and recorded project results. Test and benchmark claims were inspected, not rerun during this catalog refresh. Physical line counts use the stated file scopes.

Production GPU
4,280 linesCUDA v13 baseline measured at 57–65 billion candidates per second on the documented hardware.
Production CPU
3,331 linesGMP v33 baseline for confirmation, true-root recovery, and chain-length checks.
Independent validators
4,535 linesThree chain validators plus the GP library, whose documented load-time suite has 37 self-tests.
Campaign result
1,551,489 rootsTwo CC18 roots in the cumulative CC10–CC18 dataset; CC19 was not reached.
Reviewed sources · 2026-10-15 · 79c08694050c

113 tracked files · 44 documentation files · 0 workflow files. Inventory includes data and vendored or generated files; workflow presence does not establish a passing run.

Download inventory and line-count file scopes

Executive summary

cunningham-chain-search combines GPU filtering, CPU probable-prime confirmation, campaign operations, and interactive visual analysis to search first-kind Cunningham chains. The 2026 campaign reached its CC18 target and published its aggregate roots separately, but the repository carefully records that CC18 examples were already known from prior work. The technical contribution is the staged search pipeline, its measured filtering behavior, and the retained trail of approaches that did and did not work—not a claim to have discovered the first chain of that length.

Problem and context

A first-kind Cunningham chain follows the form where each next prime is twice the previous prime plus one. Searching long chains means rejecting enormous numbers of candidates cheaply before performing expensive confirmation. The project began with 2-adic visualizations of local structure and evolved into a high-throughput campaign split between GPU and CPU work.

What was built

  • CUDA engines for staged modular filtering, sharding, checkpointing, and long
  • campaign runs.

  • A GMP-based CPU confirmer and true-root recovery path.
  • PARI/GP tools and an analysis-oriented MCP server.
  • Python analysis scripts, campaign notes, and a separate published dataset.
  • Seven standalone visual tools for chain structure, candidate analysis, and
  • campaign tracking.

  • A retained set of failed approaches and newer experimental sampling branches.

How it works

The production path enumerates CRT-surviving positions on a search lattice, passes them through increasingly expensive modular filters on the GPU, and sends the small surviving fraction to a CPU GMP path. The repository reports a 57–65 billion-candidate-per-second public baseline on the documented RTX 4090 and RTX 5090 configurations, with faster experimental branches kept separate until validation is sufficient.

The multi-seed experimental branch samples thousands of empirical small-prime fingerprints derived from observed roots. Its campaign coordination rules differ from the single-seed production branches and are documented explicitly.

Evidence and validation

The completed campaign produced two first-kind CC18 roots. The companion data release contains 1,551,489 roots from CC10 through CC18. Earlier CC16 and CC17 results were submitted to the maintained public Cunningham tables; the README records its table comparisons and dates them.

The GP library runs 37 self-tests on load, and the CPU engine exposes a test mode. Benchmark values are presented with hardware and branch context rather than as a hardware-independent rate.

Boundaries

The repository does not claim the first known CC18. It did not reach CC19, and the campaign ended when available GPU time was exhausted. Experimental v15 and v16 results do not replace the public baseline. The source repository contains the original analysis snapshot; the later cumulative dataset lives in the separate data repository.

Repository map and first run

gcc -O3 -march=native -flto src/cpu/cc_gmp_v33_03.c -o cc_search -lgmp -lpthread -lm
./cc_search --test

Start with docs/SEARCH_PIPELINE.md and docs/REPO_MAP.md. Use src/cuda/ for the GPU engines, analysis/ for campaign interpretation, experiments/failed/ for the retained negative-experiment inventory, and visualizations/ for browser-based exploration.