I am creating a pull request for update to an algorithm.
The updated program only checks numbers from 2 to the square root of the given number, instead of checking all numbers from 2 to the given number. This is because a number is prime if and only if it is not divisible by any number less than or equal to its square root. This makes the program more efficient, especially for large numbers.
I am creating a pull request for update to an algorithm. The updated program only checks numbers from 2 to the square root of the given number, instead of checking all numbers from 2 to the given number. This is because a number is prime if and only if it is not divisible by any number less than or equal to its square root. This makes the program more efficient, especially for large numbers.