Wheel factorization

ID: wheel-factorization

Choose a modulus that is a product of small primes. Every prime not dividing must be coprime to , so a search can restrict candidates to the corresponding residue classes modulo . For several linear polynomials, discard each residue class in which any required value is divisible by a selected prime. The surviving residue classes can be combined using the Chinese remainder theorem.

New to topics? Read the docs here!