Interactive Prime Number Tester & Explorer
Test if any number is prime, inspect nearest prime neighbors, prime gaps, and special prime types.
The fascinating world of numbers
Test if any number is prime, inspect nearest prime neighbors, prime gaps, and special prime types.
Test if any number is prime, inspect nearest prime neighbors, prime gaps, and special prime types.
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Numbers greater than 1 with more than two factors are composite.
All prime numbers p > 3 can be written in the form 6k + 1 or 6k − 1
Trial division only needs to test prime divisors up to √n. If no prime factor ≤ √n divides n, then n is guaranteed to be prime.
√97 ≈ 9.84. We only need to check primes 2, 3, 5, 7. None of these divide 97, so 97 is prime! Its nearest primes are 89 and 101.
Any even number greater than 2 is divisible by 2, which gives it at least three factors (1, 2, and itself), making it composite.
A prime number p is a Sophie Germain prime if 2p + 1 is also a prime number (e.g., 23 is prime, and 2 × 23 + 1 = 47 is also prime).