
C++ reference implementation of the Pythagorean modular prime sieve operating on the inradius index r, with optional OpenMP parallelism and batch or pure streaming APIs. The software is designed for memory-efficient prime generation and direct access to distant prime ranges. This repository provides an industrial-grade C++ implementation of the **Pythagorean modular prime sieve**, a novel prime generation method introduced by Roberto Amato. The algorithm is based on a modular reformulation of divisibility arising from Pythagorean geometry. Odd integers are parametrized as $$x = 2r + 1,$$ and composite values are excluded through a single congruence condition on the index $r$. For any odd divisor $d \geq 3$, one has $$x \text{ divisible by } d\;\Longleftrightarrow\;r \equiv \frac{d - 1}{2} \pmod{d}.$$ Each odd divisor eliminates exactly one residue class modulo $d$, yielding a sparse modular sieve with reduced memory requirements. This formulation naturally supports segmentation, parallel execution, and streaming prime generation, and enables direct access to primes located far from the origin without storing all preceding values.
If you use this software, please cite it as below.
modular arithmetic, prime numbers, high-performance computing, Pythagorean geometry, OpenMP, sieve algorithms
modular arithmetic, prime numbers, high-performance computing, Pythagorean geometry, OpenMP, sieve algorithms
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 0 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
