[algorithm] Why do we check up to the square root of a prime number to determine if it is prime?