Probable prime is a term from number theory for an integer that has passed one or more probabilistic primality tests and so is likely to be prime. These tests work by checking congruence relations or algebraic properties that all primes satisfy. When an integer passes a test it becomes a "probable prime" for that test: most such numbers are actually prime, but some composites (called pseudoprimes) can pass. For background see number theory sources.

Common tests and classifications

Several different tests give rise to different kinds of probable primes. Typical examples include:

  • Fermat probable primes: numbers n that satisfy a^(n-1) ≡ 1 (mod n) for a chosen base a (by Fermat's little theorem). See Fermat test.
  • Euler and Euler–Jacobi probable primes: refinements using quadratic residues to reduce false positives.
  • Strong probable primes (often from the Miller–Rabin test): a stricter check with much smaller error probability per random base.
  • Lucas probable primes and variations: tests based on recurrence sequences and algebraic properties.

Reliability and error

Probabilistic tests are designed so that a composite number will fail with high probability for a random choice of parameters. For the most commonly used strong probable prime (Miller–Rabin) test, a composite odd integer will be a strong probable prime for at most a fraction of the possible bases; this gives a concrete bound on the error per test. By repeating the test with several independent bases, the chance of mistakenly accepting a composite can be reduced to negligible levels for practical purposes.

History and development

Probable-prime tests evolved from simple consequences of Fermat's little theorem into more sophisticated algorithms that exploit group and field structure. They were refined in the 20th century and remain the fastest methods for certifying primality in large numbers in most applications. Deterministic polynomial-time algorithms for primality also exist, but they are usually slower in practical use than repeated probabilistic tests.

Uses and examples

In cryptography, probable-prime tests are routinely used to generate large primes for keys: a random odd candidate is tested until it passes several bases and is accepted as prime with high confidence. Some well-known composites illustrate limitations: 341 (11×31) is a Fermat pseudoprime to base 2, and Carmichael numbers are composites that pass Fermat tests to every base coprime to them. Practitioners therefore prefer stronger tests such as Miller–Rabin and may follow up with deterministic or certificate-producing methods like Miller–Rabin variants or provable algorithms.

Distinctions and notable facts

"Probable prime" is not a proof of primality. For rigorous guarantees one uses primality certificates or deterministic algorithms. Nevertheless, the balance of speed and extremely low error probability makes probable-prime testing the practical standard for large-number primality in computing and cryptography.