What Is a Prime Number?
A prime number is a positive integer greater than 1 that has no positive divisors other than 1 and itself. The number 2 is the only even prime number.
First 25 Prime Numbers (Up to 100)
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.
Fast Primality Testing Rules
- Ending Digit Rule: Any number ending in 0, 2, 4, 5, 6, 8 (except 2 and 5) is composite.
- Sum of Digits Rule: If the sum of a number's digits is divisible by 3, the number itself is divisible by 3.
- Trial Division: To test if N is prime, test division only up to √N.