Close to uniform prime generation with few random bits

Unlocked AI-classified Computational number theory

Not yet human-checked. Classified by an AI system from its reading of the literature. No human expert has checked this entry yet. Treat the status as a draft, not as settled.

Statement

Fix q proportional to x^(1 - epsilon). The algorithm picks a random residue a coprime to q, tests random numbers a + t q up to x for primality up to (log x)^2 times, and then falls back to testing uniformly random integers up to x. It terminates almost surely, its output distribution on primes up to x is statistically close to uniform, and on average it needs (1 + o(1)) (phi(q)/q) log x primality tests and (epsilon + o(1)) (phi(q)/q) (log x)^2 / log 2 random bits.

No formal statement recorded yet.

What it needs

  • GRH-Dirichlet GRH for Dirichlet L-functions Covered by the claim

    Every non-trivial zero of every Dirichlet L-function has real part 1/2. Dirichlet L-functions are built from characters of the integers modulo q and control how primes are distributed among residue classes.

Status and why

Unlocked

Every hypothesis this result needs is covered by the announced proof. It follows from that proof, and stands or falls with it.

Every hypothesis listed above (GRH-Dirichlet) is covered by the announced proof.

Note. The paper defines its hypothesis as the Riemann Hypothesis for L-functions of Dirichlet characters. It is used, through a theorem of Turan on the mean square of pi(x; q, a) - pi(x)/phi(q) over residues a, for both the uniformity bound and the average running time. Termination does not depend on it. The same paper gives a different algorithm with a random modulus that is analyzed unconditionally with the Barban-Davenport-Halberstam theorem, but its distance to uniform is only polynomially small in log x, so it does not replace this result.

Sources

  1. Conditional proof P.-A. Fouque, M. Tibouchi (2014). Close to uniform prime number generation with fewer random bits. Preprint.
    Hypothesis used at: Theorems 3.4.1 and 3.4.2

Review

Review state
AI-classified Classified by an AI system from its reading of the literature. No human expert has checked this entry yet. Treat the status as a draft, not as settled.
Confidence
high
Lean
Not formalized yet.
Added
21 November 2026

Open questions

  • The entry combines Theorem 3.4.1 (uniformity) and Theorem 3.4.2 (iterations and random bits) for Algorithm 2. Theorem 3.4.1 also bounds the collision entropy, which is left out of the statement.

Suggest a correction I checked this entry

Related entries

algorithms prime-generation primes-in-arithmetic-progressions