Wheel modulus (source code)

= Wheel modulus
{title2=$W=\prod_{p\in S}p$}

The <wheel modulus> is the product $W$ of a chosen finite <set> of small distinct <prime numbers> in <wheel factorization>. Except for those primes themselves, every prime candidate must lie in a residue class coprime to $W$. For $W=2\cdot3\cdot5=30$, the allowed residues are $1,7,11,13,17,19,23,29$, repeating every thirty <integers>. The proportion retained is $\varphi(W)/W$. Passing the wheel only avoids these small divisors; it does not certify primality, since composite values such as $49$ still pass.