| Number | Expected | Smallest Divisor (if composite) | Notes |
|---|---|---|---|
| 1 | Composite | — | Not prime by definition. |
| 2 | Prime | — | Only even prime. |
| 9 | Composite | 3 | Perfect square. |
| 17 | Prime | — | No divisors up to 4. |
| 21 | Composite | 3 | 3 × 7. |
| 97 | Prime | — | Common test prime. |
A prime number is a positive integer greater than 1 with exactly two divisors: 1 and itself. The calculator uses trial division up to ⌊√n⌋, because if n = a × b, then at least one factor is ≤ √n.
- Optimized trial (6k±1): after checking 2 and 3, test only numbers of the form 6k−1 and 6k+1.
- Basic trial: checks odd divisors from 3 to ⌊√n⌋.
- Sieve of Eratosthenes: for ranges, mark multiples of each prime starting from p² up to the range end.
- Select a mode: Single, List, or Range.
- Enter your number(s) in the matching input field.
- Pick a method: optimized trial, basic trial, or sieve.
- Enable options like factorization or iteration statistics.
- Press Submit to view results above the form.
- Use CSV or PDF buttons to download your report.
1) Why is 1 not prime?
Primes must have exactly two positive divisors. The number 1 has only one divisor, so it is classified as composite for this checker.
2) Which method should I choose?
Use optimized trial for most single checks. Use basic trial for learning. Use the sieve when you need many results inside a moderate range.
3) What does “smallest divisor” mean?
It is the smallest integer greater than 1 that divides the number exactly. If a smallest divisor exists, the number is composite.
4) Why is sieve limited to 2,000,000?
Sieve mode stores a boolean array up to the range end. Very large ends consume significant memory and time, so the tool caps the upper limit.
5) Why does factorization sometimes show “Skipped”?
Factoring huge integers can be slow with simple methods. When values exceed the safe factoring limit, the calculator skips factorization but still reports prime/composite.
6) Do negative numbers count as prime?
By the standard definition, primes are positive integers greater than 1. This tool treats negative inputs as composite and focuses on standard primality.
7) What do iteration statistics represent?
Iterations count how many divisor candidates were tested. Fewer iterations usually means faster checks, especially with the 6k±1 optimization.
8) How do the downloads work?
After you run a calculation, results are stored for the session. The CSV export includes all rows, while the PDF may truncate very long outputs.