Check if a number is prime, see its full prime factorization, and find the primes nearest to it.
A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. Numbers with more than two factors are called composite numbers. The number 1 is neither prime nor composite, since it only has one factor.
The simplest method is trial division: check whether any whole number from 2 up to the square root of the target number divides it evenly. If none do, the number is prime. This works because if a number has a factor larger than its square root, it must also have a matching factor smaller than its square root.
Prime factorization breaks a composite number down into the prime numbers that multiply together to produce it. For example, 60 factors into 2 ร 2 ร 3 ร 5. Every whole number greater than 1 has exactly one prime factorization, which is why it's such a useful building block in number theory.
No. By definition, a prime number must have exactly two distinct factors. Since 1 only has one factor (itself), it's excluded from both the prime and composite categories.
Yes. Every other even number is divisible by 2, which means it has at least three factors (1, 2, and itself), making it composite. 2 is the only even number with exactly two factors.
Prime numbers are the foundation of number theory and are heavily used in cryptography โ many encryption systems, including RSA, rely on the fact that multiplying two large primes is easy, but factoring the result back into those primes is extremely difficult.