6 ms·
It looks like a pen and paper algorithm adapted to computing. Though even then it sucks. Mod 2, mod 5, mod 3 would eliminate more non primes and require less s
by qtplatypus 7y ago
It looks like a pen and paper algorithm adapted to computing. Though even then it sucks. Mod 2, mod 5, mod 3 would eliminate more non primes and require less steps in pen and paper.