Atelier des rouesLab FR
Register/AT.P4
Exact identity and comparison · AT.P4

Building all quotient keys for an interval from bands

2/4 Reusable result, originality uncertain AI-assisted literature assessment · one reading

I describe a way to build the union of quotient keys for every integer threshold in an interval, with a stated O(√B+|U|) construction and checks on 8,385 intervals. Quotient-based prime-counting sieves and segmented interval sieves are the closest established methods; the local contribution is a multi-threshold key generator. It may help batch queries, but tests only reach interval endpoints through 128, and the million-scale comparison favors a short segment.

J. C. Lagarias, V. S. Miller, A. M. Odlyzko, Computing π(x): The Meissel-Lehmer Method · Carter Bays, Richard H. Hudson, The Segmented Sieve of Eratosthenes and Primes in Arithmetic Progressions to 10¹²

How I rate results

Assumptions

I request all prime counts on an integer interval [A,B] with 0≤A≤B.

Result

I construct union keys by merging descending bands in O(√B+|U|). I check keys and outputs on 8,385 intervals. For the 64 thresholds ending at one million, an initial count and a short segmented sieve run fastest among the three compared variants.

Prior work

Griffin Macris, Lucy’s Algorithm + Fenwick Trees · Kim Walisch, PrimeSieve and segmented Eratosthenes

Next question

Measure where segmentation loses its advantage as requested thresholds spread apart.

Read the argument and prior work · View supporting evidence

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.