Prime & Factorization

Check whether a number is prime, find its complete prime factorisation, list all divisors, and find the nearest prime numbers. Prime divisors are highlighted in the divisor list.

Prime Number Theory
Trial division: test divisors 2, 3, 5, 7, … up to √n If none divide n evenly, n is prime. Number of divisors: if n = p₁^a × p₂^b × p₃^c … then count = (a+1)(b+1)(c+1)… Example: 360 = 2³ × 3² × 5¹ → (3+1)(2+1)(1+1) = 24 divisors

Every integer ≥ 2 can be uniquely expressed as a product of primes (Fundamental Theorem of Arithmetic). This uniqueness is the foundation of modern cryptography — large primes are easy to multiply but extremely hard to factor.

How to use
Prime numbers

A prime number is divisible only by 1 and itself. 2, 3, 5, 7, 11, 13… are the first few primes. 1 is not prime by definition.

Prime factorisation

Every composite number can be expressed as a unique product of prime factors (Fundamental Theorem of Arithmetic). For example: 360 = 2³ × 3² × 5.

Divisors

All integers that divide evenly into the number. The number of divisors can be calculated from the prime factorisation: multiply (each exponent + 1). For 360 = 2³×3²×5¹, divisors = (3+1)(2+1)(1+1) = 24.

Tips
  • All even numbers greater than 2 are composite. All primes except 2 are odd.
  • If a number's digits sum to a multiple of 3, it's divisible by 3.
  • Prime factorisation is the foundation of RSA encryption — large primes are extremely hard to factor.