Prime, Composite, Co-prime & Twin Prime Numbers
Prime, composite, co-prime and twin prime numbers are fundamental concepts of the Number System. A clear understanding of their definitions, properties and relationships is important for solving questions on number properties, divisibility, factors and many other topics in JSSC, SSC, Railway and similar competitive examinations.
1. Prime Number
A prime number is a positive integer greater than 1 that has exactly two distinct positive factors:
Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...
For example, the positive factors of 7 are only 1 and 7. Therefore, 7 is prime.
Prime Number: A positive integer greater than 1 having exactly two distinct positive factors.
2. Composite Number
A composite number is a positive integer greater than 1 that has more than two distinct positive factors.
Examples: 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ...
For example, the positive factors of 12 are:
1, 2, 3, 4, 6, 12
Since 12 has more than two distinct positive factors, it is composite.
Remember: A composite number may be even or odd. For example, 8 is even and composite, while 9 is odd and composite.
3. Is 1 Prime or Composite?
1 is neither prime nor composite.
It has only one positive factor, namely 1 itself. A prime requires exactly two distinct positive factors, while a composite number requires more than two.
Very Important Exam Fact: 1 is neither prime nor composite.
4. Important Basic Facts
| Fact | Answer |
| Smallest prime number | 2 |
| Only even prime number | 2 |
| Smallest odd prime number | 3 |
| Smallest composite number | 4 |
| Number neither prime nor composite | 1 |
5. Why 2 is the Only Even Prime
Every even integer greater than 2 is divisible by 2 in addition to 1 and itself. Therefore, it has more than two distinct positive factors and is composite.
Hence:
2 is the only even prime number.
6. Prime Numbers from 1 to 100
The prime numbers less than or equal to 100 are:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
There are 25 prime numbers from 1 to 100.
7. Useful Prime-Number Counts
| Range | Number of Primes |
| 1 to 10 | 4 |
| 1 to 20 | 8 |
| 1 to 50 | 15 |
| 1 to 100 | 25 |
8. Every Prime Greater than 2 is Odd
Since 2 is the only even prime, every prime number greater than 2 must be odd.
But the converse is false: Every odd number is not prime. For example, 9, 15, 21 and 25 are odd but composite.
9. Prime Numbers Greater than 3 and the Form 6k ± 1
Every integer can be represented in one of the following forms:
6k, 6k + 1, 6k + 2, 6k + 3, 6k + 4, 6k + 5
A prime greater than 3 cannot be divisible by 2 or 3. Therefore, it must have the form:
6k − 1 or 6k + 1
Examples: 5, 7, 11, 13, 17, 19, 23 and 29 satisfy this condition.
Important: The converse is not true. A number of the form 6k ± 1 is not necessarily prime. For example, 25 = 6 × 4 + 1, but 25 is composite.
10. How to Test Whether a Number is Prime
To determine whether an integer n > 1 is prime, it is sufficient to test divisibility by prime numbers not exceeding √n.
Prime Test Rule: If no prime number less than or equal to √n divides n, then n is prime.
11. Why Checking Only up to √n is Enough
If n is composite, then:
n = a × b
If both a and b were greater than √n, their product would be greater than n, which is impossible. Therefore, every composite number greater than 1 has at least one factor—and consequently at least one prime factor—not exceeding √n.
12. Example: Is 97 Prime?
√97 is less than 10. Therefore, test the prime divisors 2, 3, 5 and 7.
- 97 is not divisible by 2.
- 9 + 7 = 16, so it is not divisible by 3.
- It does not end in 0 or 5, so it is not divisible by 5.
- 97 is not divisible by 7.
Therefore, 97 is prime.
13. Example: Is 91 Prime?
√91 is less than 10, so checking 2, 3, 5 and 7 is enough.
Since:
91 = 7 × 13
91 is composite.
14. Possible Unit Digits of Prime Numbers Greater than 5
Every prime number greater than 5 must end in:
1, 3, 7 or 9
A number ending in 0, 2, 4, 6 or 8 is even, while a number greater than 5 ending in 5 is divisible by 5.
Exam Trap: Ending in 1, 3, 7 or 9 does not prove that a number is prime. For example, 21, 27, 39 and 91 are composite.
15. Co-prime Numbers
Two positive integers are called co-prime or relatively prime if their HCF (GCD) is 1.
HCF(a, b) = 1
Examples: (8, 15), (9, 10), (14, 25), (21, 22).
Important: Co-prime numbers do not have to be prime numbers themselves.
16. Co-prime Does Not Mean Both Numbers are Prime
Consider 8 and 15:
- 8 is composite.
- 15 is composite.
- HCF(8, 15) = 1.
Therefore, 8 and 15 are co-prime even though both are composite.
17. 1 is Co-prime with Every Positive Integer
For every positive integer n:
HCF(1, n) = 1
Therefore, 1 is co-prime with every positive integer, even though 1 itself is neither prime nor composite.
18. Any Two Distinct Prime Numbers are Co-prime
Two distinct primes have no common positive factor other than 1.
Examples: (5, 7), (11, 13), (17, 29).
Therefore, any two distinct prime numbers are co-prime.
Note: A prime number is not co-prime with itself because HCF(p, p) = p.
19. Consecutive Integers are Always Co-prime
Any two consecutive positive integers n and n + 1 are co-prime.
If a positive integer d divides both, it must also divide their difference:
(n + 1) − n = 1
The only positive divisor of 1 is 1. Therefore:
HCF(n, n + 1) = 1
Examples: (8, 9), (20, 21), (100, 101).
20. Consecutive Odd Numbers are Always Co-prime
Two consecutive odd integers differ by 2. If a common divisor d divides both, it must divide 2. But a common divisor of two odd integers must itself be odd. The only positive odd divisor of 2 is 1.
Therefore:
Any two consecutive odd integers are co-prime.
Examples: (7, 9), (15, 17), (21, 23), (99, 101).
21. Consecutive Even Numbers are Not Co-prime
Two consecutive even integers can be written as:
2n and 2n + 2 = 2(n + 1)
Since consecutive integers n and n + 1 are co-prime:
HCF(2n, 2n + 2) = 2
Example: HCF(14, 16) = 2.
Do not confuse: Consecutive integers are co-prime; consecutive odd integers are also co-prime; consecutive even integers have HCF 2.
22. Co-prime Numbers Have No Common Prime Factor
Two positive integers are co-prime if and only if they have no common prime factor.
Example:
18 = 2 × 32, 35 = 5 × 7
They have no common prime factor, so HCF(18, 35) = 1.
23. Powers of Co-prime Numbers Remain Co-prime
If a and b are co-prime positive integers, then their positive integral powers also remain co-prime:
HCF(a, b) = 1 ⇒ HCF(am, bn) = 1
for positive integers m and n.
Example: Since 2 and 3 are co-prime, 24 = 16 and 33 = 27 are also co-prime.
24. Pairwise Co-prime and Overall HCF 1
For three or more integers, having overall HCF 1 does not necessarily mean that every pair is co-prime.
Example: For 6, 10 and 15:
HCF(6, 10, 15) = 1
But:
- HCF(6, 10) = 2
- HCF(6, 15) = 3
- HCF(10, 15) = 5
So the three numbers have overall HCF 1, but they are not pairwise co-prime.
Pairwise Co-prime: Every pair selected from the given numbers must have HCF 1.
25. Twin Prime Numbers
Two prime numbers whose difference is exactly 2 are called twin primes.
|p − q| = 2
Examples: (3, 5), (5, 7), (11, 13), (17, 19), (29, 31).
Important: Merely differing by 2 is not enough; both numbers must be prime.
26. Twin Prime Pairs Below 100
(3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73)
There are 8 twin-prime pairs below 100.
27. Form of Twin Primes Greater than 3
Every twin-prime pair in which both primes are greater than 3 has the form:
(6k − 1, 6k + 1)
Examples:
- (5, 7) = (6 × 1 − 1, 6 × 1 + 1)
- (11, 13) = (6 × 2 − 1, 6 × 2 + 1)
- (17, 19) = (6 × 3 − 1, 6 × 3 + 1)
The pair (3, 5) is the exceptional twin-prime pair.
Converse is False: 6k − 1 and 6k + 1 are twin primes only when both numbers are prime. For k = 4, we get 23 and 25, but 25 is composite.
28. Important Properties of Twin Primes
For twin primes greater than 3:
p = 6k − 1, q = 6k + 1
- The number between them is 6k, so it is divisible by 6.
- Their sum is 12k, so it is divisible by 12.
- Their product is 36k2 − 1, i.e. one less than a multiple of 36.
Example: For 11 and 13, the middle number is 12, their sum is 24 and their product is 143 = 144 − 1.
29. Sum of Two Prime Numbers
Every prime except 2 is odd. Therefore:
- The sum of two odd primes is always even.
- If the sum of two prime numbers is odd, one of those primes must be 2.
Examples: 11 + 17 = 28, while 2 + 13 = 15.
30. Difference of Two Prime Numbers
The difference of two odd primes is always even.
Therefore, if the positive difference between two prime numbers is odd, one of the primes must be 2.
31. Product of Two Prime Numbers
The product of two prime numbers is always composite.
Examples:
- 3 × 5 = 15 → Composite
- 7 × 11 = 77 → Composite
- 5 × 5 = 25 → Composite
A product of two primes greater than 1 therefore can never itself be prime.
32. Solved Example: Identify the Prime Number
Which of 91, 97, 111 and 121 is prime?
- 91 = 7 × 13 → Composite
- 97 → Prime
- 111 = 3 × 37 → Composite
- 121 = 112 → Composite
Therefore, the required number is 97.
33. Solved Example: Identify a Co-prime Pair
Which pair is co-prime: (12, 18), (14, 21), (16, 25), or (21, 35)?
- HCF(12, 18) = 6
- HCF(14, 21) = 7
- HCF(16, 25) = 1
- HCF(21, 35) = 7
Therefore, 16 and 25 are co-prime.
34. Solved Example: Consecutive Numbers
Find HCF(2026, 2027).
Since 2026 and 2027 are consecutive integers:
HCF(2026, 2027) = 1
35. Solved Example: Twin Prime Property
Are 41 and 43 twin primes?
- 41 is prime.
- 43 is prime.
- 43 − 41 = 2.
Therefore, (41, 43) is a twin-prime pair.
36. Common Exam Traps
Trap 1: 1 is neither prime nor composite.
Trap 2: 2 is prime and is the only even prime.
Trap 3: Every odd number is not prime.
Trap 4: Every number of the form 6k ± 1 is not necessarily prime.
Trap 5: A number ending in 1, 3, 7 or 9 is not automatically prime.
Trap 6: Co-prime numbers do not have to be prime.
Trap 7: Two distinct primes are co-prime, but a prime is not co-prime with itself.
Trap 8: Consecutive odd integers are co-prime; consecutive even integers are not.
Trap 9: Overall HCF 1 does not necessarily mean numbers are pairwise co-prime.
Trap 10: Two numbers differing by 2 are twin primes only when both are prime.
37. Quick Revision
- A prime number is greater than 1 and has exactly two distinct positive factors.
- A composite number is greater than 1 and has more than two distinct positive factors.
- 1 is neither prime nor composite.
- 2 is the smallest prime and the only even prime.
- 3 is the smallest odd prime.
- 4 is the smallest composite number.
- There are 25 primes from 1 to 100.
- Every prime greater than 2 is odd, but every odd number is not prime.
- Every prime greater than 3 has the form 6k ± 1, but the converse is false.
- To test n for primality, checking prime divisors up to √n is sufficient.
- A prime greater than 5 can end only in 1, 3, 7 or 9.
- Two numbers are co-prime when their HCF is 1.
- Co-prime numbers need not themselves be prime.
- 1 is co-prime with every positive integer.
- Any two distinct prime numbers are co-prime.
- Any two consecutive integers are co-prime.
- Any two consecutive odd integers are co-prime.
- Two consecutive even integers have HCF 2.
- Positive integral powers of co-prime numbers remain co-prime.
- Pairwise co-prime means every pair has HCF 1.
- Twin primes are two prime numbers differing by exactly 2.
- Twin primes greater than 3 have the form 6k − 1 and 6k + 1.
- The middle number of twin primes greater than 3 is divisible by 6.
- The sum of twin primes greater than 3 is divisible by 12.
- If the sum or positive difference of two primes is odd, one of the primes must be 2.
- The product of two prime numbers is always composite.
Previous Year Questions (PYQs)
Practice these previous-year questions on prime, composite, co-prime and twin prime numbers. Try each question before opening the answer and explanation.
SSC MTS PYQ24 October 2017 · Shift I
Q1. Which of the following statements is/are true?
I. 2 is a prime number.
II. 4 is a composite number.
A. Only I
B. Only II
C. Both I and II
D. Neither I nor II
Correct Answer: C. Both I and II
Explanation:
2 has exactly two distinct positive factors, 1 and 2, so it is prime.
4 has the factors 1, 2 and 4, so it has more than two distinct positive factors and is composite.
SSC MTS PYQ30 October 2017 · Shift I
Q2. Which of the following numbers is neither prime nor composite?
A. 2
B. 1
C. 3
D. 5
Correct Answer: B. 1
Explanation:
The number 1 has only one positive factor. Therefore, it is neither prime nor composite.
SSC GD PYQ23 January 2023 · Shift II
Q3. Which of the following pairs represents co-prime numbers?
A. (15, 141)
B. (15, 94)
C. (15, 235)
D. (51, 141)
Correct Answer: B. (15, 94)
Explanation:
15 = 3 × 5 and 94 = 2 × 47. They have no common prime factor, so HCF(15, 94) = 1. Hence they are co-prime.
SSC Selection Post PYQ2 August 2022 · Shift III · Graduation Level
Q4. Which of the following is a pair of co-primes?
A. (31, 93)
B. (32, 62)
C. (25, 31)
D. (14, 35)
Correct Answer: C. (25, 31)
Explanation:
25 = 52 and 31 is prime. They have no common factor other than 1. Therefore, HCF(25, 31) = 1.
RRB NTPC PYQ27 April 2016 · Shift II
Q5. Which of the following is a pair of twin prime numbers?
A. (4, 9)
B. (2, 3)
C. (4, 6)
D. (3, 5)
Correct Answer: D. (3, 5)
Explanation:
3 and 5 are both prime numbers and their difference is 5 − 3 = 2. Therefore, (3, 5) is a twin-prime pair.
SSC CHSL PYQ10 March 2023 · Shift II
Q6. How many prime numbers are there between 20 and 50?
A. 8
B. 5
C. 6
D. 7
Correct Answer: D. 7
Explanation:
The prime numbers between 20 and 50 are:
23, 29, 31, 37, 41, 43, 47
Therefore, there are 7 such prime numbers.
Practice MCQs
Practice these exam-oriented questions on prime, composite, co-prime and twin prime numbers.
Practice MCQ
Q1. Which is the smallest composite number?
A. 1
B. 2
C. 3
D. 4
Correct Answer: D. 4
Explanation:
1 is neither prime nor composite; 2 and 3 are prime. The number 4 has factors 1, 2 and 4, so it is the smallest composite number.
Practice MCQ
Q2. Which of the following numbers is prime?
A. 91
B. 97
C. 111
D. 119
Correct Answer: B. 97
Explanation:
91 = 7 × 13, 111 = 3 × 37 and 119 = 7 × 17. For 97, no prime up to √97 divides it. Therefore, 97 is prime.
Practice MCQ
Q3. Which pair is co-prime?
A. (18, 27)
B. (21, 35)
C. (24, 35)
D. (28, 42)
Correct Answer: C. (24, 35)
Explanation:
24 = 23 × 3 and 35 = 5 × 7. They have no common prime factor, so their HCF is 1.
Practice MCQ
Q4. Which of the following is a twin-prime pair?
A. (7, 11)
B. (11, 13)
C. (13, 17)
D. (17, 23)
Correct Answer: B. (11, 13)
Explanation:
11 and 13 are both prime and differ by exactly 2.
Practice MCQ
Q5. Which set has overall HCF 1 but is not pairwise co-prime?
A. (5, 7, 11)
B. (6, 10, 15)
C. (7, 8, 9)
D. (11, 13, 17)
Correct Answer: B. (6, 10, 15)
Explanation:
HCF(6, 10, 15) = 1, but HCF(6, 10) = 2, HCF(6, 15) = 3 and HCF(10, 15) = 5. Therefore, the numbers are not pairwise co-prime.
Practice MCQ
Q6. If p and q are two distinct prime numbers, what is HCF(p, q)?
A. 0
B. 1
C. p
D. pq
Correct Answer: B. 1
Explanation:
Distinct prime numbers have no common positive factor other than 1.
Practice MCQ
Q7. Which statement about every prime number greater than 3 is true?
A. It has the form 6k.
B. It has the form 6k ± 1.
C. Every number of the form 6k ± 1 is prime.
D. It has the form 6k + 3.
Correct Answer: B. It has the form 6k ± 1.
Explanation:
A prime greater than 3 is divisible by neither 2 nor 3, so its remainder on division by 6 must be 1 or 5. Hence it has the form 6k + 1 or 6k − 1. The converse is not necessarily true.
Practice MCQ
Q8. If the sum of two prime numbers is odd, which statement must be true?
A. Both primes are odd.
B. Both primes are even.
C. One of the primes is 2.
D. Both primes are greater than 5.
Correct Answer: C. One of the primes is 2.
Explanation:
An odd sum requires one number to be even and the other odd. Since 2 is the only even prime, one of the primes must be 2.
Practice MCQ
Q9. If 29 and 31 are twin primes, which statement is correct?
A. Their middle number is divisible by 6.
B. Their sum is odd.
C. Their product is divisible by 36.
D. Their difference is 4.
Correct Answer: A. Their middle number is divisible by 6.
Explanation:
The number between 29 and 31 is 30, which is divisible by 6. Their difference is 2, their sum is 60, and their product is one less than a multiple of 36.
Practice MCQ
Q10. Which statement is false?
A. Any two consecutive positive integers are co-prime.
B. Any two consecutive odd positive integers are co-prime.
C. Any two consecutive even positive integers are co-prime.
D. Any two distinct prime numbers are co-prime.
Correct Answer: C. Any two consecutive even positive integers are co-prime.
Explanation:
Two consecutive even integers have HCF 2, not 1. Therefore, they are not co-prime.