Skip to content

Project restrictions

Ahmet Burak Biçer edited this page Jun 30, 2026 · 1 revision

Project restrictions

These rules apply to all contributors and automated agents.

Non-negotiable

  1. Deterministic — no randomness; same input ⇒ same output, always.
  2. No stochastic Miller–Rabin — no random bases, no “probably prime” engines as the core.
  3. No prime libraries as the implementation (e.g. primesieve, sympy.isprime as the engine).
  4. Allowed: NumPy / Numba for speeding up our trial division and helpers.
  5. Correctness model
    • $n < 2^{64}$: exact 30030-wheel trial division up to $\lfloor\sqrt{n}\rfloor$
    • larger $n$: small-factor trial, then AKS (may be slow for huge primes)

Why not “just use MR”?

Fixed witness Miller–Rabin is deterministic only on proven finite ranges (e.g. 64-bit with a known base set). That does not give a uniform finite-base proof for every natural number. This project optimizes under the stricter goal: deterministic for all $n$ in theory, with a fast engineered path for 64-bit inputs.

Agent files in the main repo

Best-Prime-Number-Function

Wiki


Repository · Pages wiki

AI-designed project — review before production use.

Clone this wiki locally