All projects

Computational search · Active

k-tuplet-search

A CUDA, GMP, and PARI/GP toolkit for validating known prime k-tuplets and running staged GPU search campaigns.

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
7,041 linesCUDA v8 search engine, excluding shared runtime/support code.
CPU reference
2,749 linesGMP search and proving implementation.
Test harness
2,556 linesCUDA tests and header plus shell/Python QA in tests/ and two tools tests; 52 engine passes are recorded.
Validation corpus
39 + 227PARI/GP self-tests plus sourced known records across k=16–21; the catalog has 97 patterns.
Reviewed sources · 2026-10-15 · 190012808aa2

144 tracked files · 25 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

k-tuplet-search adapts a staged GPU/CPU search architecture to additive prime patterns. It contains a 97-pattern CUDA catalog for tuple lengths 3 through 28, wheel construction, GPU residue filtering, GMP confirmation, checkpointed campaign operation, a sourced known-record corpus, and an interactive analyzer. The repository can reproduce known examples and run long search cells, but it does not claim a new k-tuplet record. That distinction makes the work useful as an engine and reproducibility artifact rather than a results announcement.

Problem and context

A prime k-tuplet asks whether every value in an admissible offset pattern is prime at the same base. At large sizes, most candidates must be rejected with cheap residue tests before probable-prime confirmation. The project ports the filtering style developed for Cunningham chains while changing the candidate formula and pattern machinery.

What was built

  • A generated C catalog of 97 admissible narrow-diameter patterns.
  • Plain and quotient-style primorial wheel expressions.
  • A staged CUDA filter with prefix lanes, random and sequential modes,
  • checkpoint/resume, and JSONL hit persistence.

  • CPU GMP confirmation and a separate GPU oracle engine.
  • PARI/GP planning tools and self-tests.
  • A sourced JSON corpus and generation scripts for known-record replay.
  • Campaign, benchmark, migration, and command-reference documentation.

How it works

The wheel selects base positions that survive small-prime constraints. GPU stages then apply progressively more expensive forbidden-residue and Fermat filters. The small survivor set moves to the host for GMP/BPSW verification of every member of the pattern.

Operational controls divide the prefix space, persist progress, and cap campaign cells. Quotient wheel expressions allow selected small primes to remain outside the initial wheel when comparing filter tradeoffs.

Evidence and validation

The May 2026 release snapshot records 52 passing CUDA-engine tests on the stated RTX 5090 and CUDA 13.2 configuration. Known-record gates draw from 227 sourced records across k=16..21, while the PARI/GP library runs 39 self-tests. Longevity runs are labeled as stability and sampling evidence rather than exhaustive coverage.

Boundaries

No new record is claimed. The local pattern-generation tools are conveniences; the repository names Norman Luhn's maintained pattern and Hardy–Littlewood tables as the mathematical reference. Searches above the maintained record range are exploratory. Default CUDA paths and architecture flags must be changed for hardware other than the documented Blackwell setup.

Repository map and first run

cd src/cuda
make kt_filter_v8 NVCC=/path/to/nvcc NVCC_ARCH=sm_89
./kt_filter_v8 --test
./kt_filter_v8 --list-patterns

Use docs/CUDA_CLI_REFERENCE.md for the full interface, TESTING.md for gates and benchmark interpretation, known/records.json for the record corpus, and visualizations/ for the live analyzer.