sqrt(5141)= 71.7
So, if we divide 5141 by an integer larger than 71 we obtain a number smaller than or equal to 71.7. If 5141 is divisible by any such integer, that number we obtain after division will also be an integer, so we end up with an integer smaller than or equal to 71. The number 5141 will then be divisible by that integer smaller than or equal to 71.
So, we only need to check for divisibility by primes smaller than or equal to 71.
What is the greatest prime number you must consider to test whether 5141 is prime?
2 answers
What is the greatest prime you must consider to test whether 6230 is​ prime?