Example 1 — Test for prime
Show the steps and the answer
Decide which primes to test: is less than 29, but is more, so test only 2, 3 and 5.
If 29 split into two factors, the smaller one would have to be small enough that its square is at most 29.
Test 2 and 5: 29 ends in 9, so it is odd and doesn't end in 0 or 5.
The last-digit tests settle 2 and 5 without dividing.
Test 3: is not a multiple of 3, and indeed .
The digit-sum test shows 3 leaves a remainder of 2, so it is not a factor.
Conclude: no prime up to 5 divides 29, so its only factors are 1 and 29.
Exactly two factors is what makes a number prime.
Answer: Yes, is prime
Takeaway: To test for prime, try primes only until the prime times itself is bigger than the number.