Question 416821
The square root of 503 is a little more than 22 (but less than 23), so the largest prime lower than the square root of 503 is 19. This is the largest one you'll need to test.