Trial division: To test if n is prime, one can check for every k≤ sqrt (n) if k divides n. If no divisor is found, then n is prime. 

Or 6k+/-1

Similar questions and discussions