simplified factor logic, skipped special cases in primary sieve loop