A prime is an integer greater than 1 with exactly two positive divisors. To test a number, check prime divisors up to its square root; a factor pair cannot have both factors larger than that root.
Know what counts as prime before testing
A prime number has exactly two positive divisors: 1 and itself. Seven is prime because only 1 and 7 divide it evenly. Nine is composite because it also has the divisor 3.
One is not prime: it has only one positive divisor. Two is prime and is the only even prime. Every larger positive even integer has 2 as an additional divisor, which makes it composite.
The questions below are original practice examples, not answers to numbered game levels. If you enjoy checking number properties, Moocsoft’s math puzzle app offers a separate collection of riddles and short number challenges.
Eliminate the easy composites first
| Divisor | Test | Example |
|---|---|---|
| 2 | Last digit is even | 38 is divisible by 2 |
| 3 | Digit sum is divisible by 3 | 57: 5 + 7 = 12 |
| 5 | Last digit is 0 or 5 | 85 is divisible by 5 |
Remember the exceptions: 2, 3 and 5 themselves are prime. The checks show divisibility; they do not make a number composite if that divisor is the number itself.
Passing these three checks is not a proof of primality. For example, 49 is not divisible by 2, 3 or 5, but 49 = 7 × 7. That is why a stopping rule matters.
Stop at the square root, not at half the number
If n = a × b and both a and b were greater than √n, their product would be greater than n. Therefore a composite number must have a factor no larger than its square root. You only need to test prime divisors up to that point.
For 97, the square root lies between 9 and 10 because 9² = 81 and 10² = 100. Test 2, 3, 5 and 7. The number is odd, its digits sum to 16, and it does not end in 0 or 5. It is not divisible by 7: the neighboring multiples are 91 and 98. Therefore 97 is prime.
Include the boundary when the square root is an integer. For 49, testing 7 is essential. You do not need to test composite divisors such as 4 or 6 after checking their prime factors.
Try six prime-or-composite questions
Classify 1, 2, 51, 77, 91 and 97. For each composite number, find one factor pair. For a prime, explain why the relevant tests are complete.
Reveal the classifications and reasons
1: neither prime nor composite. 2: prime, with divisors 1 and 2. 51: composite, because 3 × 17 = 51. 77: composite, because 7 × 11 = 77. 91: composite, because 7 × 13 = 91. 97: prime; none of 2, 3, 5 or 7 divides it, and its square root is below 10.
The pair 91 and 97 is a useful reminder that nearby odd numbers can behave differently. Test each number rather than transferring the conclusion from its neighbor.
Find the prime that satisfies the clues
Here is a second kind of puzzle: I am a prime between 20 and 30, and my digits add to 5. What am I? List the candidates before opening the answer.
Reveal the clue-puzzle answer
23. Its digits add to 5. Its square root is below 5, so only 2 and 3 need testing: 23 is odd and its digit sum is not divisible by 3. It satisfies both clues.
A clue puzzle asks you to satisfy every condition. Finding a prime in the interval is not sufficient if it fails the digit-sum condition. This is the same checking habit used in hidden-rule math puzzles.
Build a short number-checking round
Pick five integers under 100 and classify them without a timer. For each composite, write a factor pair; for each prime, list the prime divisors you checked. Once the explanation is reliable, use a short app challenge for variety rather than relying on memorized answers to this page.
These steps are suitable for small practice numbers; they are not an efficient method for testing enormous integers. For a different arithmetic challenge, try target-sum puzzles or the order-of-operations questions.
Common questions
Why is 1 not a prime number?
A prime must have exactly two positive divisors. One has only one: itself.
Are all odd numbers prime?
No. For example, 9, 49 and 91 are odd composites. Being odd only rules out divisibility by 2.
Why do I only test up to the square root?
Every composite has a factor pair with at least one factor at or below its square root. Testing prime factors through that point is enough.
Published by Moocsoft, the independent studio behind Math Riddles. Examples and worksheets are illustrative. App features can vary by platform and version; see the store listing for current availability and in-app purchases.