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

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

A recursive sieve-step formula for generating the prime numbers

Michel Jarjoura
Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
preprint

A recursive sieve-step formula for generating the prime numbers

Michel Jarjoura
preprint en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.