Prime Number Checker

: Check whether a number is prime, up to 1,000 digits, with its smallest factor, prime factorization, next and previous prime; list the primes up to N or between two numbers
Limits: .txt
Answer
The answer appears here as you type.

A prime number checker for whole numbers up to 1,000 digits: type a number and it says whether it is prime, and if not, its smallest factor and its prime factorization, with the next and previous prime. It is also a prime factorization calculator with every divisor, and it lists the primes up to any number or between two numbers. With the box empty it shows the list of prime numbers under 1,000. It runs in your browser.

  1. Type a number in Numbers, one per line, or paste several, one per line. 1,000,003, 1 000 003 and 1_000_003 are all read as one number, and powers such as 2^61-1 are worked out. The Examples menu has a few to try.
  2. Leave the mode on Is it prime? to get the answer, the smallest factor, the factorization, the previous and next prime and, up to 10,000,000, the number's position among the primes. Several lines give a table: number, prime or not, smallest factor and factorization.
  3. Choose Prime factorization for the prime factors, the number of divisors, their sum, the list of divisors and each division step.
  4. Choose List primes and type 1000 for the primes up to 1,000, or 100-200 (also 100 to 200, between 100 and 200) for the primes between. List separator sets commas or one prime per line for Copy list; Download has both.
  5. A long job (a sieve to 100,000,000, a hard factorization, a test of a 1,000-digit number) shows its progress and a Cancel button. Cancel on a factorization keeps the factors found so far.

Three numbers, one per line, in Is it prime?: a prime, a composite with its factors, and 561, the smallest Carmichael number, which fools the simple Fermat test but not this one.

Input
97
91
561
Output
Yes: 97 is a prime number
No: 91 is a composite number: 91 = 7 × 13
No: 561 is a composite number: 561 = 3 × 11 × 17

What is a prime number?

A whole number greater than 1 that has exactly two divisors, 1 and itself, such as 2, 3, 5, 7, 11 and 13. A whole number above 1 with more divisors is composite: 91 is composite because 91 = 7 × 13.

Is 1 a prime number?

No. A prime has exactly two divisors and 1 has only one, itself. 1 is neither prime nor composite, and so is 0. Type 1 to see the answer with the next prime, 2.

What are the prime numbers from 1 to 100?

There are 25: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. With the box empty the page shows this list of prime numbers to 100 and the table of the primes under 1,000; List primes gives the list to 1,000, to 1,000,000 or to any number.

How does the prime factorization calculator work?

It divides by the primes below 65,536, smallest first, then uses Pollard's rho method on the part left and tests each part for primality until every factor is prime. The steps are shown as a list of divisions, such as 360 ÷ 2 = 180.

Why does a big number say probable prime?

Above 3.3 × 10²⁴ no fast test proves a number prime. The number passed the Baillie–PSW test, which no known composite number passes, but which has not been proven for every number. A Mersenne number is the exception: the Lucas–Lehmer test proves it.

Runs entirely in your browser. Nothing is uploaded.