naiveprimalitytest
nounUK /naɪˈiːv praɪˈmælɪti tɛst/
US /naɪˈiv praɪˈmæləti tɛst/
A simple way to check if a number is prime by trying to divide it by every smaller number.
The naiveprimalitytest checks each number one by one until it finds a divisor.
OTHER MEANINGS
2. A beginner-level method for testing primes that is easy to understand but slow for large numbers.
For small inputs, the naiveprimalitytest is fast enough to use in class.
3. Any straightforward check that tries all possible divisors up to the square root of a number.
We improved the naiveprimalitytest by stopping at the square root.
4. A teaching example used to introduce the idea of primality testing before faster methods.
The lesson started with the naiveprimalitytest before moving to the sieve of Eratosthenes.