Prime Numbers: Rules, Formulas and Solving Methods

Prime Numbers are natural numbers greater than 1 that have exactly two distinct factors: 1 and the number itself. This page explains prime number rules, divisibility tests, factorisation methods, useful formulas, shortcuts and common numerical questions. It also covers special cases such as 2, the only even prime number, and 1, which is neither prime nor composite.

On this page

What Are Prime Numbers?

A prime number is a natural number greater than 1 that has exactly two positive factors: 1 and the number itself. Examples include 2, 3, 5, 7, 11 and 13.

A number greater than 1 with more than two positive factors is called composite. The number 1 is neither prime nor composite because it has only one positive factor. The number 2 is the only even prime number; every other even number has at least the factors 1, 2 and itself.

Prime Numbers Formula & Tricks

Important Formulas

Prime-number test
n is prime if no integer d, where 2 ≤ d ≤ √n, divides n

To check whether n is prime, test divisibility only by integers up to √n. If none divides n, then n is prime.

Factors of a prime power
Number of positive factors of pᵃ = a + 1

Here p is prime and a is a positive integer. For example, 2⁴ has 4 + 1 = 5 factors.

Number of factors from prime factorisation
If n = p₁ᵃ¹ × p₂ᵃ² × ... × pₖᵃᵏ, then d(n) = (a₁ + 1)(a₂ + 1)...(aₖ + 1)

The exponents in the prime factorisation determine the total number of positive factors.

Quick Tricks

Check divisors only up to the square root

For a number n, any factor greater than √n must be paired with a factor smaller than √n. Therefore, finding no divisor from 2 through √n proves that n is prime.

Example: For 97, √97 is less than 10. Test 2, 3, 5 and 7. None divides 97, so 97 is prime.
Use the last digit to reject candidates

Every prime number greater than 5 must end in 1, 3, 7 or 9. A number ending in 0, 2, 4, 5, 6 or 8 is composite, except for the primes 2 and 5 themselves.

Example: 137 can be a prime because it ends in 7, whereas 145 is composite because it is divisible by 5.
Apply digit-sum divisibility tests

If the sum of the digits is divisible by 3, the number is divisible by 3. If the digit sum is divisible by 9, the number is divisible by 9. These tests quickly reject many candidates.

Example: The digit sum of 231 is 2 + 3 + 1 = 6, so 231 is divisible by 3 and is not prime.

Prime Numbers Concepts

Testing Whether a Number Is Prime

To test n for primality, check whether any prime number not exceeding √n divides it.

It is sufficient to test prime divisors because a composite number must have a prime factor. For 149, √149 is approximately 12.2, so test 2, 3, 5, 7 and 11. None divides 149; therefore, 149 is prime.

Example: For 91, √91 is approximately 9.5. Since 7 divides 91, 91 = 7 × 13, so 91 is composite.

Prime Number Divisibility Rules

A prime candidate greater than 5 must not be divisible by 2, 3, 5 or any other prime up to its square root.

Use the even-number rule for divisibility by 2, the last-digit rule for divisibility by 5, and the digit-sum rule for divisibility by 3 and 9. After these quick checks, test the remaining prime divisors up to √n.

Example: For 221, the quick checks do not reject it. Since √221 is less than 15, test 7, 11 and 13. As 13 × 17 = 221, it is composite.

Prime Factorisation

Prime factorisation expresses a composite number as a product of prime numbers.

Every integer greater than 1 has a unique prime factorisation apart from the order of its factors. For example, 360 = 2³ × 3² × 5. This form can be used to calculate factors, HCF and LCM.

Example: 84 = 2 × 42 = 2² × 21 = 2² × 3 × 7.

Properties of Prime Numbers

Every prime number greater than 2 is odd, and the product of two or more integers greater than 1 is composite.

The only even prime is 2. Two distinct prime numbers are always coprime because their greatest common divisor is 1. If a prime p divides a product ab, then p divides a or p divides b.

Example: 5 and 11 are distinct primes, so HCF(5, 11) = 1. Also, 3 divides 3 × 14, so it divides at least one factor of the product.

Prime Numbers Video Lessons

Watch short topic-wise lessons for quick revision.

14 Lessons
Lesson 1 of 14 Quick Revision

Prime Numbers: Test and Find Them Fast

Learn how to test whether a number is prime and identify prime numbers efficiently using clear divisibility checks and practical methods.

Continue with more lessons and practice in PrepShots.Watch More in App - Start ₹1 Trial →
More Prime Numbers Lessons Scroll to explore →

Practice Prime Numbers Questions

Practise published questions related to this topic.

Prime Numbers Quick Quiz

Attempt 5 questions and check your score instantly.

Quick Revision Notes

Prime Numbers: Quick Revision

Use these rules and methods for fast recall.

  • A prime number has exactly two positive factors: 1 and itself.
  • The number 1 is neither prime nor composite.
  • 2 is the only even prime number.
  • Every prime greater than 5 ends in 1, 3, 7 or 9.
  • To test n, check divisibility by prime numbers up to √n.
  • A composite number has at least one factor other than 1 and itself.
  • If n = p₁ᵃ¹ × p₂ᵃ² × ... × pₖᵃᵏ, then the number of factors is (a₁ + 1)(a₂ + 1)...(aₖ + 1).
  • Every integer greater than 1 has a unique prime factorisation, apart from the order of factors.

Prime Numbers FAQs

Is 1 a prime number?

No. The number 1 has only one positive factor, while a prime number must have exactly two positive factors. Therefore, 1 is neither prime nor composite.

What is the only even prime number?

2 is the only even prime number. Every other even number is divisible by 2 and has more than two positive factors.

How can you check whether 101 is prime?

Since √101 is slightly greater than 10, test the primes 2, 3, 5 and 7. None divides 101, so 101 is prime.

Why is checking up to √n enough for a prime test?

If n = ab and both a and b were greater than √n, then ab would be greater than n. Thus, every composite number has at least one factor less than or equal to √n.

How many positive factors does 72 have?

72 = 2³ × 3². Therefore, its number of positive factors is (3 + 1)(2 + 1) = 12.

What is the difference between prime factorisation and factorisation?

Factorisation writes a number as a product of integers, while prime factorisation writes it only as a product of prime numbers. For example, 12 = 3 × 4 is a factorisation, whereas 12 = 2² × 3 is its prime factorisation.

Continue learning Prime Numbers on PrepShots

Continue on PrepShots