Question 1027857
.
What is the greatest prime that must be considered to test whether 671 is prime? 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


{{{sqrt(671)}}} = 25.9 (approximately).


So the greatest prime you are asking for is 23.