Atelier des rouesLab FR

Counts in residue classes

1/4 Educational or exploratory value AI-assisted literature assessment · one reading

I compare aggregate residue-class portfolios and the cost of updating them. Deléglise, Dusart, and Roblot already adapt the Meissel–Lehmer family of prime-counting methods to counts in residue classes. The proposed measurements may help choose among implementations for several thresholds, but they do not yet establish a new counting recurrence. I would test the complete cost, including initialization, memory, and competing thresholds outside the reported ranges.

Marc Deléglise, Pierre Dusart, and Xavier-François Roblot, Counting Primes in Residue Classes

How I rate results

APP015 · Supported mathematical construction (XI)

Prior work and my contribution

I compare portfolios of residue classes and the cost of their updates. Deléglise, Dusart and Roblot give a direct antecedent for the progression recurrence.

Limit and next check

Benchmark identical modular queries, including preprocessing and reconstruction of each margin.

Prior work

Deléglise, Dusart & Roblot, Counting Primes in Residue Classes

I connect this field to True prime rank up to the first omitted cube.

A05 infers primes p≤√X when S(p)−S(p−1)=1. At one million I find 78,498 primes with 1,999 quotients and 24,641 update divisions. Traces agree with the historical implementation at four scales. Primecount independently checks 153 counts and three selections. I distinguish inferred information from AT.P1’s explicitly constructed factor list. Detecting small primes inside quotient counts

Further checks

Subproblems agree at matched stages. For 64 consecutive thresholds I reduce updates from 1,576,270 to 55,498. I check all counts and independently compare 183 distinct thresholds with primecount across three batches. At X=8, reading a final cofactor value too early gives 5 instead of 4. Sharing a sieve cell across several thresholds

A state collision for primality

The integers 19 and 49 share a state modulo 30. One is prime and the other is 7 squared. Adding wheel 7 eliminates 49, then 121 is the first surviving composite above 7. I verify survivors up to 1,000 by trial division. No rule depending only on this state can separate 19 and 49.

The collision generalizes. For any fixed modulus M≥2 and prime q not dividing M, q and q(1+M) have the same residue. The latter is composite. Choosing q above any specified threshold gives a collision beyond that threshold. This elementary argument identifies what a proposed new algebra must add.

My next test is to specify another state variable and commit to an out-of-sample prediction. AT.P11 · Walisch, primesieve

An enriched state that still loses addition

I augment the residue modulo 30 with divisibility flags for 7 and 11. On [150,400] the first surviving composite is the predicted 169 = 13². Prime 151 has the same state as 361 = 19². States of 2 and 32 agree, while those of 3 and 33 differ. I therefore cannot define a successor on this state alone. The full residue modulo 2,310 preserves addition but is periodic.

I plan to specify an operation carrying the state without the original integer and search a fresh interval for its first counterexample. AT.P13 · Walisch, primesieve

Historical results — A04 · Progression counts, A05 · Quotient sieve, O03 · Modular portfolios

Download bilingual dossier ↓

Comments

Comments from both language editions appear here.

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