Prime Forms

darkreach searches for 12 special forms of prime numbers. Each form has a dedicated sieve, primality test, and (where possible) deterministic proof algorithm.

Factorial

Pocklington / Morrison proof
n! ± 1

Primes adjacent to factorial numbers. n! grows super-exponentially, making these primes extremely rare at large n. Pocklington proofs use the known factorization of n! for N-1 certificates.

Largest known: 208003! - 1 (1,015,843 digits)

OEIS: A002981 / A002982

bash
darkreach factorial --start 1000 --end 5000

Primorial

Pocklington / Morrison proof
p# ± 1

Primes adjacent to the product of all primes up to p. Similar structure to factorials but the complete factorization is trivially known, enabling efficient proofs.

Largest known: 1648079# + 1 (715,021 digits)

OEIS: A014545 / A005234

bash
darkreach primorial --start 1000 --end 50000

Proth / Riesel (k*b^n ± 1)

Proth test / LLR test + BSGS sieve
k·b^n ± 1

The workhorse form for large prime searches. Proth's theorem provides a simple deterministic test for k·2^n+1 when k < 2^n. The BSGS (baby-step giant-step) sieve efficiently eliminates composites.

OEIS: A080076

bash
darkreach kbn --k 3 --base 2 --min-n 100000 --max-n 500000

Cullen / Woodall

Proth test / LLR test
n·2^n ± 1

Cullen numbers (n·2^n+1) and Woodall numbers (n·2^n-1). A special case of k·b^n±1 where k=n. Cullen primes are very rare — only 16 known.

OEIS: A005849 / A002234

bash
darkreach cullen-woodall --min-n 1000 --max-n 100000

Generalized Fermat

Pepin test / Proth test
b^(2^n) + 1

Generalization of Fermat numbers F_n = 2^(2^n)+1 to arbitrary bases. Only 5 Fermat primes are known (F_0 through F_4). Generalized Fermat primes with large bases are more common.

OEIS: A019434

bash
darkreach gen-fermat --min-base 2 --max-base 1000 --exponent 16

Wagstaff

Vrba-Reix PRP test
(2^p + 1) / 3

Wagstaff numbers for prime p. No deterministic primality proof is known — all results are probable primes (PRP). The multiplicative-order sieve eliminates many composites efficiently.

OEIS: A000978

bash
darkreach wagstaff --min-p 1000 --max-p 100000

Carol / Kynea

LLR test
(2^n ± 1)² − 2

Carol primes (2^n-1)²-2 and Kynea primes (2^n+1)²-2. These expand to 4^n - 2^(n+1) - 1 and 4^n + 2^(n+1) - 1 respectively, which are k·b^n-1 forms testable by LLR.

OEIS: A091515 / A091516

bash
darkreach carol-kynea --min-n 10 --max-n 100000

Twin Primes

Quad sieve + Proth/LLR intersection
p, p + 2

Pairs of primes separated by exactly 2. The twin prime conjecture (infinitely many exist) remains unproven. darkreach searches for twin primes of the form k·2^n ± 1, requiring both to pass primality tests.

OEIS: A001359

bash
darkreach twin --k 3 --base 2 --min-n 1000 --max-n 100000

Sophie Germain

Proth + LLR intersection sieve
p, 2p + 1

A prime p is a Sophie Germain prime if 2p+1 is also prime (a safe prime). Safe primes are used in cryptography (Diffie-Hellman groups). Both p and 2p+1 must pass independent primality tests.

OEIS: A005384

bash
darkreach sophie-germain --k 3 --base 2 --min-n 1000 --max-n 100000

Palindromic

Deep sieve + Miller-Rabin
d₁d₂...d₂d₁

Primes that read the same forwards and backwards in a given base. Even-digit palindromes are always divisible by (base+1), so only odd-digit counts are searched. Batch generation with deep sieve filtering.

OEIS: A002385

bash
darkreach palindromic --base 10 --min-digits 1 --max-digits 11

Near-Repdigit

BLS N+1 proof
aaa...baa...a

Palindromic primes where all digits are the same except one. The structured form enables BLS (Brillhart-Lehmer-Selfridge) N+1 proofs, providing deterministic verification.

OEIS:

bash
darkreach near-repdigit --base 10 --min-digits 5 --max-digits 15

Repunit

PFGW PRP
R(b,n) = (b^n − 1) / (b − 1)

Numbers consisting entirely of 1s in base b. Extremely rare — only 11 known decimal repunit primes. n must be prime for R(10,n) to possibly be prime. PFGW acceleration is essential for large candidates.

OEIS: A004023

bash
darkreach repunit --base 10 --min-n 100 --max-n 100000