LLMpediaThe first transparent, open encyclopedia generated by LLMs

Primality testing

Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Decision problem Hop 5 terminal

This article was accepted into the corpus but its outbound wikilinks were never NER-processed — typical at the deepest BFS hop or when the run's entity cap was reached. No expansion funnel to show.

Primality testing
NamePrimality testing
FieldNumber theory, Computer science
IntroducedAntiquity
NotableAgrawal–Kayal–Saxena, Miller–Rabin, Fermat's little theorem

Primality testing is the task of deciding whether a given integer is prime, rooted in Euclid's elements and relevant to Galois theory, Gaussian integers, RSA (cryptosystem), Goldbach conjecture applications. The subject draws on methods from Pierre de Fermat's work, Srinivasa Ramanujan's formulae, links to Alan Turing's computability, and implementations in systems influenced by Claude Shannon, John von Neumann, and frameworks used by National Institute of Standards and Technology and GNU Project tools.

Definition and Basic Concepts

Primality testing classifies integers using definitions from Euclid and criteria shaped by results such as Fermat's little theorem, Euler's theorem, Wilson's theorem, Legendre symbol, and the Jacobi symbol; proofs often reference constructs from Pierre de Fermat, Leonhard Euler, and Adrien-Marie Legendre. Core objects include special primes like Mersenne primes, Fermat primes, Sophie Germain primes, Safe primes, and classes studied by Édouard Lucas and Mary Cartwright; certificates of primality invoke techniques related to Proth's theorem, Pepin's test, and Pocklington's theorem. Notions of pseudoprimes appear in contexts tied to Fermat pseudoprime and Carmichael numbers discovered following inquiries by Robert Carmichael and Paul Erdős.

Deterministic Algorithms

Deterministic methods include trial division used historically by Erastosthenes's sieve, Lucas sequences developed by Édouard Lucas, and more advanced routines like the Agrawal–Kayal–Saxena algorithm proven by Manindra Agrawal, Neeraj Kayal, and Nitin Saxena. Other deterministic approaches involve results with origins in Miller and elaborations by Gary L. Miller under assumptions from Robert Solovay and Volker Strassen, while unconditional deterministic variants reference work by M. O. Rabin and improvements by researchers at Institute for Advanced Study and Massachusetts Institute of Technology. Deterministic primality proofs also use elliptic curve methods derived from ideas by Atkin and Morain and link to theorems associated with Andrew Wiles in modularity contexts.

Probabilistic Algorithms

Probabilistic tests such as Miller–Rabin primality test (developed by Gary L. Miller and improved by Michael O. Rabin), Solovay–Strassen primality test (by Robert Solovay and Volker Strassen), and tests based on Fermat's little theorem yield efficient likely-prime decisions used in practice by implementations influenced by RSA Laboratories, OpenSSL, and GNU Privacy Guard. These algorithms relate to randomization paradigms popularized by Richard Karp and theoretical foundations from Leslie Valiant and Manuel Blum, and their error analyses draw on results linked to Paul Erdős and Christiaan Huygens-style probability reasoning. Hybrid methods combine probabilistic screening with deterministic certificates developed in collaborations across University of California, Berkeley, Stanford University, and Princeton University.

Complexity and Computational Hardness

Complexity classifications mention connections to classes studied by Stephen Cook and Richard Karp like P (complexity), NP (complexity), and concepts from co-NP and BPP; the placement of deterministic primality in P (complexity) followed the breakthrough by Agrawal–Kayal–Saxena. Hardness results reference problems related to integer factorization studied by Carl Pomerance, John Pollard, and René Peralta, and link to cryptographic assumptions used by Rivest–Shamir–Adleman and protocols standardized by Internet Engineering Task Force. Reductions and lower bounds cite work by Michael Sipser, László Babai, and researchers at Bell Labs.

Practical Implementations and Performance

Practical systems implement tests in libraries maintained by OpenSSL, GnuPG, Libgcrypt, and software from GNU Project and Microsoft Research; high-performance code leverages large-integer libraries such as GMP (GNU Multiple Precision Arithmetic Library) and optimizations from Intel and AMD microarchitecture teams. Implementations for specific prime families like Mersenne primes use specialized algorithms including the Lucas–Lehmer test introduced by Edmond Lehmer and Édouard Lucas, while distributed searches are coordinated by projects like Great Internet Mersenne Prime Search and validated using testing methods promoted by Project Gutenberg-hosted literature and computational centers at Lawrence Livermore National Laboratory. Benchmarking draws on contributions from ACM conferences and datasets maintained by National Institute of Standards and Technology.

Applications in Cryptography and Number Theory

Primality tests are fundamental to public-key schemes attributed to Rivest–Shamir–Adleman, Diffie–Hellman key exchange, and protocols standardized by Internet Engineering Task Force and World Wide Web Consortium; they support key generation in software by OpenSSL and Microsoft. Number-theoretic consequences connect to conjectures and theorems studied by Andrew Wiles, G. H. Hardy, John Littlewood, and Paul Erdős; primality decisions also underpin algorithms in elliptic curve cryptography developed by Neal Koblitz and Victor S. Miller and factorization-resistant constructs researched at Bell Labs and AT&T Laboratories.

Historical Development and Notable Results

Historical milestones trace from ancient contributions attributed to Euclid and tables compiled by Srinivasa Ramanujan, through 19th-century advances by Carl Friedrich Gauss, Adrien-Marie Legendre, and Édouard Lucas, to 20th-century computational breakthroughs by Alan Turing, John von Neumann, and D. H. Lehmer. Key modern results include the deterministic polynomial-time proof by Manindra Agrawal, Neeraj Kayal, and Nitin Saxena, improvements by Miller–Rabin-era researchers like Michael O. Rabin and Gary L. Miller, and elliptic curve methods advanced by A. O. L. Atkin and Frances Morain. Ongoing searches for large primes are led by initiatives involving GIMPS and contributions recorded by The On-Line Encyclopedia of Integer Sequences and academic institutions such as University of California, Berkeley and Massachusetts Institute of Technology.

Category:Number theory