A recursive sieve-step formula for generating the prime numbers
We introduce a recursive function pas_p(v), the sieve step, that, given a prime p and an integer v, returns the distance from v to the next integer coprime to every prime <= p. The function is defined by a single, elementary recurrence whose only operations are addition, multiplication, integer division (floor), and subtraction. Iterating this recurrence yields a closed-form three-line recursive formula P(n) = P(n-1) + pas_{P(n-2)}(P(n-1)), P(0) = 2, P(1) = 3, that produces the sequence of prime numbers (OEIS A000040) with no trial division, no sieve table, and no primality test other than a single application of Bertrand's postulate in the proof of correctness. We prove a structural property — the single-skip lemma — that bounds the number of consecutive F_{p^-}-elements eliminated when a new prime is added, and use this property together with Bertrand's postulate to establish that the recurrence cannot overshoot the next prime. We discuss the relation to wheel factorization (Pritchard, 1981), to Rowland's gcd-recurrence (2008), and to the Jacobsthal function. MSC 2020: 11A41, 11N05, 11Y11, 11B83 Keywords: prime numbers, sieve of Eratosthenes, recurrence, coprime gaps, Jacobsthal function, wheel factorization, Bertrand's postulate.
Authors
- Michel Jarjoura
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-06-09
- DOI
- https://doi.org/10.5281/zenodo.20614454
- Primary Topic
- Advanced Combinatorial Mathematics
- Type
- preprint