Guide complet
Guide de la calculatrice de nombres premiers
Utilisez cette page pour vérifier la primalité, factoriser et rechercher des plages de nombres premiers, tout en comprenant les résultats supplémentaires sur les premiers voisins.
Guide complet
What This Calculator Does
This page is best for three related tasks. First, deciding whether an integer is prime. Second, factoring a number into its prime factors. Third, listing every prime in a selected interval. Because those three tools live together, the page works well for classroom practice, early number theory study, contest prep, and quick verification.
Unlike pages that return only one yes-or-no answer, this one also shows nearby primes, smallest factor, or divisor count depending on the mode. That makes it more useful for understanding the number, not just labeling it.
When to Use It
- You want to know whether a specific integer is prime.
- You want the prime factorization of a number.
- You want every prime inside a chosen range.
- You want context about the nearest surrounding primes.
Inputs Explained
Mode
The current page supports three modes.
checkfor primality testingfactorfor prime factorizationrangefor listing all primes in an interval
Single Number
In check and factor mode, the page expects one integer greater than or equal to 2. Smaller values are rejected because the current model focuses on the standard prime-number domain beginning at 2.
Range Start and Range End
In range mode, both values must be integers and the end cannot be smaller than the start. To keep the page responsive, the current implementation also limits the range span to 100000.
How the Calculation Works
In prime-check mode, the page uses trial division. It checks whether the number is divisible by 2 or by larger odd divisors up to roughly the square root. If no divisor works, the number is treated as prime. If the number is composite, the page also reports the smallest prime factor and the full factorization.
In factorization mode, the page repeatedly divides the number by increasing candidate divisors and records each prime factor with its exponent. It then derives the total number of positive divisors from that factorization.
In range mode, the page scans from start to end and keeps the integers that pass the prime test. That makes it suitable for teaching and moderate lookup ranges rather than for large-scale sieve analysis.
Example
If you want to factor 84, switch to factor mode and enter 84. The page returns the prime-factor structure and divisor count. If you want to check whether 97 is prime, switch to check mode. The page will tell you whether it is prime and also show the nearest previous and next primes.
The practical value of the example is that you can switch tasks without jumping among several tools.
How to Understand the Result
Prime Check Result
In check mode, the page tells you whether the number is prime and adds context such as smallest factor, previous prime, and next prime so the number sits inside a wider number-line picture.
Factorization and Divisor Count
In factor mode, the main output is the prime-factor structure. Divisor count is a helpful companion because it shows how decomposable the number is.
Prime Range List
In range mode, the page returns the full list of primes inside the interval. That is useful for homework checking and quick pattern spotting.
Common Mistakes
- Entering a value below
2in single-number modes. - Treating range mode like a large-scale sieve tool for huge searches.
- Looking only at the prime or non-prime label and skipping the extra factor or neighboring-prime context.
- Entering non-integers or unit-bearing text in factorization tasks.
FAQ
Why is this page good for teaching
Because it combines checking, factorization, and range lookup on one page and adds supporting outputs that help explain the number instead of only labeling it.
Why does the page limit large ranges
Because the current implementation checks numbers one by one, so very large spans would work against performance and against the page's intended use.
Notes
- The current page accepts integer input only, and single-number modes start at
2rather than modeling more advanced extensions. - Range mode is capped at a span of
100000, so it is best for teaching and moderate-size lookup rather than large-scale number theory computation.
Questions fréquentes
Quels modes cet outil prend-il en charge ?
La page supporte la vérification de primalité, la factorisation en nombres premiers et la liste des premiers dans une plage.
Quelle est la valeur minimale autorisée en mode nombre unique ?
La page requiert un entier supérieur ou égal à 2.
Quelles sont les limites de la plage ?
La valeur de fin doit être supérieure ou égale à la valeur de début, et l'intervalle ne peut pas dépasser 100 000.
La page calcule-t-elle automatiquement ?
Oui. La page recalcule au fur et à mesure des saisies, et le bouton Calculer exécute la même logique manuellement.