Powered by OpenAIRE graph
Found an issue? Give us feedback
image/svg+xml Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao Closed Access logo, derived from PLoS Open Access logo. This version with transparent background. http://commons.wikimedia.org/wiki/File:Closed_Access_logo_transparent.svg Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao ZENODOarrow_drop_down
image/svg+xml Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao Closed Access logo, derived from PLoS Open Access logo. This version with transparent background. http://commons.wikimedia.org/wiki/File:Closed_Access_logo_transparent.svg Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao
ZENODO
Software . 2026
Data sources: ZENODO
image/svg+xml Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao Closed Access logo, derived from PLoS Open Access logo. This version with transparent background. http://commons.wikimedia.org/wiki/File:Closed_Access_logo_transparent.svg Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao
ZENODO
Software . 2026
Data sources: ZENODO
image/svg+xml Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao Closed Access logo, derived from PLoS Open Access logo. This version with transparent background. http://commons.wikimedia.org/wiki/File:Closed_Access_logo_transparent.svg Jakob Voss, based on art designer at PLoS, modified by Wikipedia users Nina and Beao
ZENODO
Software . 2026
Data sources: ZENODO
ZENODO
Software . 2026
Data sources: Datacite
ZENODO
Software . 2026
Data sources: Datacite
ZENODO
Software . 2026
Data sources: Datacite
versions View all 3 versions
addClaim

Pythagorean Modular Prime Sieve – C++ Reference Implementation

Authors: Amato, Roberto;

Pythagorean Modular Prime Sieve – C++ Reference Implementation

Abstract

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.

Keywords

modular arithmetic, prime numbers, high-performance computing, Pythagorean geometry, OpenMP, sieve algorithms

  • BIP!
    Impact byBIP!
    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
Powered by OpenAIRE graph
Found an issue? Give us feedback
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).
BIP!Citations provided by BIP!
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.
BIP!Popularity provided by BIP!
influence
This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Influence provided by BIP!
impulse
This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
BIP!Impulse provided by BIP!
0
Average
Average
Average