Number Theory · Factors
Prime numbers are the building blocks of whole-number factorization. The definition is short, but the edge cases, especially 1, 2, and large odd numbers, are where mistakes happen.
A prime number is a whole number greater than 1 with exactly two positive factors: 1 and itself. Seven is prime because only 1 and 7 divide it evenly. Twelve is composite because it also has factors such as 2 and 3.
One is neither prime nor composite. To test a number, check possible prime divisors no larger than its square root. OpenStax gives this definition and test.
What Makes A Number Prime Or Composite?
Count distinct positive divisors, not digits or appearances in a multiplication table. A prime has exactly two: 1 and itself. A composite whole number greater than 1 has more than two.
For 7, the only factor pair is 1 × 7. For 12, the factor pairs include 1 × 12, 2 × 6, and 3 × 4. The extra pairs prove 12 is composite. OpenStax explains factors and prime/composite classification.
The rectangle is a way to see a factor pair, not a complete primality algorithm. A number could have a factor pair that is difficult to spot in a picture. Use divisibility checks when the number is larger.
Why Is 1 Not Prime, And Why Is 2 Special?
One has only one positive factor: 1. It fails the “exactly two factors” test, so it is neither prime nor composite. Two has the two required factors, 1 and 2, and is prime.
Every even whole number greater than 2 is divisible by 2 and therefore composite. That makes 2 the only even prime. OpenStax explicitly identifies this exception.
How Do You Check Whether A Number Is Prime?
First rule out numbers at or below 1. For an even number greater than 2, the answer is composite. Otherwise, test prime divisors up to and including the square root.
If a number had a factor larger than its square root, its paired factor would be smaller than the square root. So any nontrivial factor pair must reveal a divisor by that point. OpenStax explains the square-root stopping point.
Example: Is 29 Prime?
Because √29 is about 5.39, test the primes 2, 3, and 5. Twenty-nine is odd; its digits sum to 11, so 3 does not divide it; and it does not end in 0 or 5. No prime at or below √29 divides 29, so 29 is prime.
Testing every number through 28 is unnecessary.
Example: Is 91 Prime?
Because √91 is about 9.54, test 2, 3, 5, and 7. Ninety-one is not divisible by 2, 3, or 5, but 91 ÷ 7 = 13. Thus 91 = 7 × 13 and is composite.
Being odd does not make it prime.
Which Numbers Under 30 Are Prime?
The primes below 30 are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. This is a useful small reference list, but memorizing it does not replace a test for a new number. Notice the gaps: 9 is 3 × 3, 15 is 3 × 5, 21 is 3 × 7, and 25 is 5 × 5.
The Prime Number Checker can verify a candidate after you work through the divisibility reasoning.
How Do Prime Numbers Relate To Prime Factorization?
A primality test asks whether a whole number has any nontrivial factor. Prime factorization goes further: it breaks a composite number into a product of primes. For example, 84 = 2 × 2 × 3 × 7.
A prime such as 29 cannot be broken into smaller positive factors, so its prime factorization is just 29. For that separate task, use the Prime Factorization Calculator.
Why Must The Square-Root Boundary Be Included?
A perfect square can have its only nontrivial prime factor exactly at the boundary. For 121, the square root is 11 and 121 = 11 × 11. Stopping before testing 11 would miss that factor.
More generally, if n = ab and both factors exceeded √n, their product would exceed n. Every composite number therefore has a nontrivial factor no larger than its square root. A prime divisor of that factor is also within the boundary.
Use exact comparisons when possible. Testing whether a candidate divisor’s square is at most n avoids a rounded square-root cutoff. A display rounded down is not a reason to skip an exact boundary value.
How Does A Sieve Find Many Small Primes?
A sieve finds a list by removing multiples rather than testing each candidate independently. Start with the whole numbers from 2 to a chosen limit. Keep the first uncrossed number and cross out its larger multiples.
Up to 20, keep 2 and cross out 4, 6, 8, and the other even numbers. Keep 3 and cross out remaining multiples such as 9 and 15. The uncrossed values are 2, 3, 5, 7, 11, 13, 17, and 19.
You need only process base primes up to the square root of the limit. Any larger composite has a smaller prime factor already processed. This is a list-building method, not a claim that the remaining numbers follow a simple digit pattern.
Is Being Coprime The Same As Being Prime?
No. Prime describes one number’s positive factors. Coprime describes two numbers whose greatest common divisor is 1.
Two composite numbers can be coprime.
For example, 8 = 2³ and 9 = 3² are both composite, but they share no prime factor. Their greatest common divisor is 1. By contrast, 7 and 14 are not coprime even though 7 is prime.
Read whether a question asks about one number or a relationship between two. A primality verdict cannot by itself answer every common-factor question.
Can A Finite List Contain Every Prime?
No. Suppose a finite list contained all primes. Multiply its members together and add 1.
Dividing that new integer by any listed prime leaves remainder 1.
The new integer either is prime or has a prime divisor not in the list. Either case contradicts the claim that the list contained every prime. This is a proof about possible factors, not a fast algorithm for predicting the next prime.
The product-plus-one value need not itself be prime. With the list 2, 3, 5, 7, 11, 13, the value is 30,031 = 59 × 509. Its factors still show that primes exist outside that list.
Why Is Excluding 1 Useful For Prime Factorization?
The definition already excludes 1 because it has only one distinct positive factor. That choice also keeps prime factorization from accumulating arbitrary factors of 1.
For 12, the prime factors are 2 × 2 × 3. Inserting one, two, or a hundred factors of 1 does not change the product, but they add no factor structure. The usual unique-prime-factorization statement ignores factor order and records genuine prime factors, not repeated units.
FAQs About Prime Numbers
Does Being Odd Prove A Number Is Prime?
No. Numbers such as 9, 15, and 21 are odd and composite. Oddness only removes divisibility by 2; other possible factors still need checking.
Does A Decimal Display Reliably Prove Divisibility?
An exact zero remainder is the appropriate check for an integer. A rounded decimal quotient can conceal a remainder. Keep exact integer arithmetic for the factor test.
Can You Test Three Numbers Yourself?
Before opening the answer, decide whether 37, 39, and 49 are prime or composite. For each number, name the divisor you found or explain why testing can stop.
Show the Worked Answers
Because √37 is a little over 6, test 2, 3, and 5; none divides 37, so it is prime. Thirty-nine equals 3 × 13, and 49 equals 7 × 7, so both are composite.
Check A Number, Then Explore Its Factors
Use the checker for a quick verdict. Use the factorization tool when you need the prime factors of a composite number.
Prime Number CheckerPrime Factorization CalculatorBrowse Number Tools