trial division
Trial division is a method used to determine if a number is prime or to find its factors. It involves dividing the number by all integers up to its square root. If any division results in a whole number, the original number is not prime, as it has factors other than 1 and itself.
This technique is straightforward and effective for small numbers. For larger numbers, it can be time-consuming, so more advanced algorithms, such as the Sieve of Eratosthenes or Fermat's Little Theorem, are often used to improve efficiency in finding primes or factors.