Vérificateur de Nombres Premiers
Vérifiez si un nombre est premier, et voyez son plus petit facteur si ce n'est pas le cas.
What is a Vérificateur de Nombres Premiers?
Tests primality by trial division up to the square root of the number — the standard efficient method for numbers in the everyday range — and, when a number isn't prime, shows its smallest factor so you can see exactly why.
How to use the Vérificateur de Nombres Premiers
- Enter a whole number
- Press Check
- The result — prime or not, with a factor if not — appears instantly, on your device
Formula
n is prime if no whole number from 2 to √n divides it evenly
Only divisors up to the square root need checking — if n had a factor larger than its square root, it would have to pair with one smaller than the square root too, which would already have been found.
Example
97 checks as prime — nothing from 2 up to its square root (about 9.8) divides it evenly — while 91 checks as not prime, since 7 divides it evenly (91 = 7 × 13), a factor pair easy to miss by eye since 91 isn't obviously composite at a glance.
Common mistakes
- Assuming 1 is prime — by definition a prime number needs exactly two distinct divisors, and 1 only has one.
- Assuming 2 can't be prime because it's even — 2 is in fact the only even prime number.
- Expecting a negative number or a decimal to return a meaningful prime/not-prime result — primality is only defined for positive whole numbers.
Frequently asked questions
What makes a number prime?
A prime number is a whole number greater than 1 with exactly two divisors: 1 and itself. If any other number divides it evenly, it's composite, not prime.
Is 1 a prime number?
No. By definition, a prime number must have exactly two distinct divisors (1 and itself); 1 only has one divisor (itself), so it's classified as neither prime nor composite.
Are negative numbers or 0 checked as prime?
Primality is only defined for positive whole numbers 2 and up — 0, 1, and negative numbers are not prime by definition, regardless of what this checker returns for them.
What's the largest number this can check quickly?
Trial division up to the square root stays fast well past the numbers most people ever need — even a 15-digit number checks in a fraction of a second, since √n is dramatically smaller than n.
Is my numbers uploaded anywhere?
No — Vérificateur de Nombres Premiers runs entirely in your browser using JavaScript/WebAssembly. Your numbers is never sent to a server.