Quantcast
Channel: How can wheel factorization be used to speed up sieving? - Mathematics Stack Exchange
Browsing all 3 articles
Browse latest View live

Answer by Varun Vejalla for How can wheel factorization be used to speed up...

Let's say you have the wheel made from the first $3$ prime numbers: $2, 3, 5$. The wheel would consist of all integer $n \in [2, 2\cdot 3\cdot 5 + 1]$ coprime to $2, 3, 5$. Specifically it would be...

View Article



How can wheel factorization be used to speed up sieving?

I've seen optimizations to the Sieve of Eratosthenes that (claim to) use "wheel factorization". If the goal is to generate a list of prime numbers up to a certain value, I'm wondering how exactly is...

View Article

Answer by user140242 for How can wheel factorization be used to speed up...

An example of how to use wheel factorization with sieve to find primes greater than $3$ is the following:code in pythonn=10000000primes5m6 = [True] * (n//6+1)primes1m6 = [True] * (n//6+1)for i in...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images