1 is not prime
We keep 1 out of the prime club so every integer >1 has a unique prime factorization (the Fundamental Theorem of Arithmetic).
Tip: accepts integers like 84, -210, or big integers (within reason). Decimals are not supported.
This tool determines whether a number is prime and computes its prime factorization. It uses optimized trial division up to \( \sqrt{n} \), checking 2, 3, and then only candidates of the form \( 6k \pm 1 \).
No. By definition, primes are integers \(\ge 2\).
We display \( -1 \times \) the factorization of \(|n|\). Example: \(-84 = -1 \times 2^2 \times 3 \times 7\).
Trial division up to \( \sqrt{n} \) is quick for typical classroom sizes (up to ~1010 is usually fine in modern browsers). Extremely large inputs will take longer.
We keep 1 out of the prime club so every integer >1 has a unique prime factorization (the Fundamental Theorem of Arithmetic).
Every other even number has 2 as a factor, so 2 stands alone—making it both the smallest prime and the loneliest even one.
Primes get rarer but never stop. There are arbitrarily long stretches of composites—yet another prime always appears eventually.
Every prime greater than 3 is of the form \(6k \pm 1\). That’s why this tool skips other residues when it searches.
Modern encryption relies on the difficulty of factoring huge semiprimes. Fast factoring breaks keys—hence the race for quantum-safe crypto.