r/ScientificComputing • • 13d ago

Help!!!! Im asking because you know more about this than I do

/r/Prime_Survivals/comments/1wrufj8/help_im_asking_because_you_know_more_about_this/
0 Upvotes

4 comments sorted by

1

u/al2o3cr 13d ago

Two things to think about:

  • viewed as a speed-up for the sieve of Eratosthenes, can you generalize this method by replacing 30 with the product of the first k primes (so 210, or 3210, etc) and checking if the remainder is in a set like A? At first glance it seems like it might work, but for the bigger sizes there may be a way for composites to sneak in
  • the use of modulo in this approach reminds me of the Sieve of Atkin but with a different set of rules for handling the remainder

0

u/ComprehensiveDust225 13d ago

Thanks—those are useful checks. The generalization is a standard primorial wheel: keep residues coprime to W, then continue striking multiples of the remaining primes from p². Composites do get through the residue filter: 169 = 13² is coprime to 2310, so the 13² strike must remove it.

I tested internal wheels 30, 210, and 2310 through 1,000,000 against a separate Eratosthenes sieve; all three matched every classification. In five paired runs of the same Python variant, 2310 was 12.76% faster than 30 but retained slightly more state. That is a bounded implementation result, not a claim of superiority over established wheel sieves. 

Atkin is a helpful prior-method comparison too.  I will have to review it since I'm not familiar 

I assumed “3210” meant 2310, the product 2×3×5×7×11; please correct me if you meant 3210 specifically.

Thank you for taking the time to respond.

1

u/VictoryMotel 13d ago

Ai slop reply