Understand the method
To test whether an integer n is prime, it is enough to check possible divisors up to the square root of n. If a number has a factor larger than its square root, it must also have a paired factor smaller than the square root. For 29, check prime divisors 2, 3, and 5. None divide 29 evenly, so 29 is prime.