What is a Prime Number?
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Numbers with more than two factors are called composite numbers.
Examples of Prime Numbers
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...
A number n is prime if it has exactly two factors: 1 and n itself.
2 is the only even prime number.
2 is the only even prime number.
How to Check if a Number is Prime
- If n ≤ 1, it is not prime.
- If n = 2 or n = 3, it is prime.
- Check divisibility by all numbers from 2 to √n.
- If divisible by any, it is composite. Otherwise, it is prime.