1001Ferramentas
🔢 Calculators

Prime Number Checker

Check if a number is prime. Shows the prime factorization, the previous prime and the next prime. Instant result.

What is a prime number?

We call a number prime when it's a natural number greater than 1 that admits only two divisors: 1 and itself. The sequence opens with 2, 3, 5, 7, 11, 13, 17, 19, 23 and keeps going from there. By definition, 1 stays out of this list.

Prime numbers: definition and primality testing

A prime number is a natural number greater than 1 with exactly two divisors: 1 and itself. By convention, 1 is not prime (the modern definition was settled in the early 20th century; before that, it was debated). The naive primality test is trial division: to check whether n is prime, test divisibility by every integer from 2 up to √n — no factor can exceed √n without pairing with a smaller one. Small primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31. The Prime Number Theorem states that primes thin out with density roughly 1/ln(n). The Sieve of Eratosthenes (≈260 BC) remains the most efficient way to list all primes up to a bound. Mersenne primes have the form Mₚ = 2^p − 1; the distributed project GIMPS found the latest known prime in 2024 — M82589933, with more than 24 million digits.

Applications: cryptography and probabilistic tests

Primes power RSA: security relies on the difficulty of factoring n = p·q when p and q are primes of ~1024 bits each. They are used in hash function design and in probabilistic primality tests like Miller-Rabin and Solovay-Strassen, shipped in libraries such as OpenSSL, Pari/GP and SageMath.

FAQ

Is 1 prime? No. Modern mathematics excludes 1 so that the Fundamental Theorem of Arithmetic (unique prime factorization) holds.

Is 2 the only even prime? Yes. Every other even number is divisible by 2 and therefore composite.

How many primes are there? Infinitely many — Euclid proved this around 300 BC by contradiction.

What is the largest known prime? M82589933 = 2^82589933 − 1, a Mersenne prime with 24,862,048 digits, discovered by GIMPS in 2024.

Related Tools

The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.