Riemann's hypothesis and tests for primality
Open accessThe DOI matches its Crossref record; 19 of the 19 references it cites were found in a registry or an index; 2 of the 14 sources its claims cite were checked for support.
Abstract
In this paper we present two algorithms for testing primality of an integer.The first algorithm runs in O(n 1/7) steps; while, the second runs in 0(log* n) step but assumes the Extended Riemann Hypothesis.We also show that a class of functions which includes the Euler phi function are computationally equivalent to factoring integers. * Research sponsored by NSF GJ
Overview
CoChat Summary
TL;DR
Miller presents two primality-testing algorithms: one deterministic in O(n^{1/7}) steps, and one assuming the Extended Riemann Hypothesis in O(log^4 n) steps (stated in Theorem 2 as O(|n|^4 log log |n|)). The paper also proves, on ERH, that Euler’s phi function and related arithmetic functions are polynomial-time equivalent to integer factorization.
Key findings
- The deterministic primality test runs in O(n^{1/7}) steps; under ERH, the improved test runs in O(log^4 n) steps, or O(|n|^4 log log |n|) steps in Theorem 2, where |n| is the binary length of n.
- On ERH, the functions φ, λ, λ′, and “prime factorization” are all polynomial-time equivalent (Theorem 3); more generally, any g with λ(n) | g(n) and |g(n)| = O(|n|^k) has “prime factorization” ≤ g (Lemma 5).
- On ERH, “period” is polynomial-time Turing equivalent to “prime factorization” (Theorem 4), and the graphs of φ, λ, λ′, and “prime factorization” are recognizable in polynomial time (Theorem 5).
- The projections of “period,” φ, λ, λ′, and “prime factorization” are in NP ∩ co-NP, and if any of these projections is in P then all the functions are in P* (Theorem 6); the paper also notes {composites} ∈ P on ERH and cites Pratt’s result that {primes} ∈ NP.
Methods
- Theoretical complexity and number-theory paper: defines a deterministic Turing-machine algorithm A_f that checks perfect powers, tests Fermat congruence, computes GCDs, and uses qth nonresidues and Jacobi symbols.
- Correctness and running time are proved via lemmas; the unconditional Theorem 1 uses Burgess bounds, while the ERH results use Ankeny’s bounds N(p,q) = O(|p|^2) and N(pq) = O(|pq|^3).
- No empirical data or sample is used; the analysis is asymptotic and reduction-based.
Limitations
- Stated: the second algorithm and the polynomial-time equivalences/recognizability results assume the Extended Riemann Hypothesis, which is unproven.
- Stated/evident: the first algorithm’s O(n^{1/7}) bound is not polynomial in the binary input length; the polynomial-time claim depends on ERH.
- Evident: no empirical validation or benchmarks are provided; results rely on external number-theoretic bounds and asymptotic notation.
Model-written summary. Check it against the paper before relying on it.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
2 Valid · 5 Not valid · 10 Not checked · 24 Own results and interpretations
Every source the paper cites for this claim was checked and supports it.
In the paper
“THEOREM (Carmichael [5]).n satisfiesFermat's Congruence if and only /f A(n) I n --1.”
§ Riemann's Hypothesis and Tests for Primality* > Motivation of Proofs
What the sources say
- Supportedcites Carmichael [5] R. D. CARMICHAEL, On composite numbers p which satisfy the Fermat congruence a v-~ ~ p, Amer. Math. Monthly 19 (1912), 22-27. source
Passage [2] (THEOREM I) states exactly the attributed result: 'A necessary and sufficient condition on the integer P in order that the congruence a^{P-1}=1 mod P shall be true for every a which is prime to P is that P-1 shall be divisible by A(p)' — the OCR 'A(P)'/'2(P)' is Carmichael's lambda function, defined in the same passage as the least common multiple of the A(p_i^{a_i}), and he notes it is the least exponent for which a^{A(P)}≡1 mod P. The surrounding derivation ('if (1) is true A(P) must be a factor of P-1. Again, if A(P) is a factor of P-1 the relation (1) is satisfied for every a prime to P') gives both directions of the iff. The paper develops this for composite P, but the stated condition is the biconditional the citing sentence attributes to it (with P/n merely a notational variant). (LLM, conf=0.90)
plainstates an association- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Supported
The sources with a verdict support this claim; the rest weren’t checked yet, have no full text we could read, or their verdicts aren’t rated yet.
In the paper
“Thus we show primality is testable in time polynomial in the length of the binary representation of n.Using the terminology of Cook [6] and Karp [9], we say primality is testable in polynomial time on the ERH.”
§ Riemann's Hypothesis and Tests for Primality* > INTRODUCTION
What the sources say
- Supportedcites Cook [6] S. A. COOK, The complexity of theorem-proving procedures, in "Conference Record of Third ACM Symposium on Theory of Computing (1970)," pp. 151-158. source
The citation is attached explicitly to the terminology, not to the ERH-conditional result: 'Using the terminology of Cook [6] and Karp [9], we say primality is testable in polynomial time...'. Our copy of Cook 1971 is precisely the source of that terminology — it defines 'P-reducible (P for polynomial)' and 'the polynomial degree of difficulty of S' (section on transitivity of P-reducibility), states that '~ is the class of sets recognizable in polynomial time', and Theorem 1 speaks of a set 'accepted by some nondeterministic Turing machine within polynomial time' (Definitions/Theorem 1 passage). Cook also fixes the number-theoretic instance the citing authors use, defining 'The set {Primes} is the set of all binary notations for prime numbers' and remarking (Theorem 2 remark and its discussion) that {primes} could not be added to the list and that reducing {tautologies} to {primes} 'would seem to require some deep results in number theory'. The ERH hypothesis itself is the citing authors' contribution and is not attributed to Cook, so nothing claimed of this source is unsupported. (LLM, conf=0.85)
- Not checked — no full text of the sourcecites Karp [9] R. M. KARP, Reducibility among combinatorial problems, in "Complexity of Computer Computations" (R. E. Miller and J. W. Thatcher, Eds.), pp. 85-103, Plenum, New York, 1972. source
boostedstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on an assumption not shown here.
- Supported
The paper states this without a source or data behind it here, so there is nothing to check it against. The quote shows it is in the paper.
In the paper
“Note again that N(pq) is prime.”
§ Riemann's Hypothesis and Tests for Primality* > LEMMA 2A.
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: unclear — It is unclear why the paper says it holds.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“(2) an-l(mod n) where a varies over the first m primes, which will take 0(m [ n [ M(r n”
§ Riemann's Hypothesis and Tests for Primality* > Analysis of Running Time
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
None of the sources cited for this claim have been checked yet.
In the paper
“THEOREM 2 (ERH). There exists an algorithm which tests primality in 0([ n [4 log log [ n i) steps.”
§ Riemann's Hypothesis and Tests for Primality* > THEOREM 2 (ERH).
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on an assumption not shown here.
23 more claims
Create a free account to see all 41 claims and to verify the 7 references still open.
- It may state two separate claims as one. 7
- The quote only partly states this claim. 3
- Probably not a substantial claim. 5
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
Each contradiction between two passages listed here was confirmed by an independent check.
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ Riemann's Hypothesis and Tests for Primality* > LEMMA 5 (ERH).
“Claim (ERH). Let h(n) = max{Period(n, 2),..., Period(n,f(n))}. Then h(n) ~ A(n) and h'(n) [ h(n).”
§ Riemann's Hypothesis and Tests for Primality* > LEMMA 5 (ERH).
“h ~r "period" since we can define a machine which simply calls for Period(n, 2) ..... Period(n,f(n)) and computes their LCM.”
Citations
Cites
Reducibility among Combinatorial Problems
Karp, R. M. (1972) · Complexity of Computer Computations · doi:10.1007/978-1-4684-2001-2_9 · Cited by 11,511
The complexity of theorem-proving procedures
Cook, S. A. (1971) · Proceedings of the third annual ACM symposium on Theory of computing - STOC '71 · doi:10.1145/800157.805047 · Cited by 6,385
Complexity of Computer Computations
(1972) · Springer eBooks · doi:10.1007/978-1-4684-2001-2 · Cited by 2,781
Schnelle Multiplikation großer Zahlen
Schönhage, A., & Strassen, V. (1971) · Computing · doi:10.1007/bf02242355 · Cited by 1,107
Class number, a theory of factorization, and genera
Shanks, D. (1971) · Proceedings of Symposia in Pure Mathematics · doi:10.1090/pspum/020/0316385 · Cited by 518
Topics in Multiplicative Number Theory
Montgomery, H. L. (1971) · Lecture Notes in Mathematics · doi:10.1007/bfb0060851 · Cited by 440
Theorems on factorization and primality testing
Pollard, J. M. (1974) · Mathematical Proceedings of the Cambridge Philosophical Society · doi:10.1017/s0305004100049252 · Cited by 402
On Character Sums and L -Series. II
Burgess, D. A. (1963) · Proceedings of the London Mathematical Society · doi:10.1112/plms/s3-13.1.524 · Cited by 392
Every Prime Has a Succinct Certificate
Pratt, V. R. (1975) · SIAM Journal on Computing · doi:10.1137/0204018 · Cited by 309
On Character Sums and Primitive Roots †
Burgess, D. A. (1962) · Proceedings of the London Mathematical Society · doi:10.1112/plms/s3-12.1.179 · Cited by 262
Research works printed but not linked: 3
- G. HARDY AND E. WRIGHT, "An Introduction to the Theory of Numbers," p. 111, Oxford Press, New York/London, 1968.
- D. KNUTH, "The Art of Computer Programming, Vol. 2: Seminumerical Algorithms," Addison-Wesley, Reading, Mass., 1969.
- A. SELRERO, Contributions to the theory of Dirichlet L functions, Avh. Nor. Vidensk., Akad. Oslo (1934).
Cited by
Items 801–861 of 861
Polynomial Algorithms for Primality Testing in Algebraic Number Fieldswith Class Number 1
Vaskouski, M. M., Prochorov, N., & Kondratyonok, N. (2024) · Journal of Mathematical Sciences · doi:10.1007/s10958-024-07529-8
Miller–Rabin Probabilistic Primality Test
Liskov, M. D. (2025) · Springer eBooks · doi:10.1007/978-3-030-71522-9_461
Contini, S. P., Koç, Ç. K., & Walter, C. D. (2025) · Springer eBooks · doi:10.1007/978-3-030-71522-9_49
Pointcheval, D. (2025) · Springer eBooks · doi:10.1007/978-3-030-71522-9_153
Updatable Public Key Encryption in the context of Secure Messaging
Haidar, C. A. (2024) · HAL
Efficient threshold multiparty computation schemes
Rosefield, S. (2024) · Digital Repository Service (Northeastern University) · doi:10.17760/d20698932
The Probabilistic Polynomial-Time Classes
Ogihara, M. (2025) · Springer eBooks · doi:10.1007/978-3-031-84740-0_13
Philosophical and mathematical reflection on Riemann’s hypothesis. I Reframing in Hilbert arithmeticPreprint
Penchev, V. D. (2025) · doi:10.33774/coe-2025-4bm72
Philosophical and mathematical reflection on Riemann’s hypothesis. I Reframing in Hilbert arithmeticPreprint
Penchev, V. D. (2025) · SocArXiv (OSF Preprints) · doi:10.31235/osf.io/yhx3g_v1
string dynamics of prime factorization: homotopy of thermodynamics and quantum complexityPreprint
Amri, Y. (2025) · OSF Preprints (OSF Preprints) · doi:10.31219/osf.io/u9jav_v1
Analysis of Algorithms for Moser's Problems on Sums of Consecutive PrimesPreprint
Sorenson, J., & Waiss, E. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2509.00236
Structural Existence of Prime Constellations: Asymptotic Spectral Stability in Finite Sieve WindowsPreprint
Caicedo, A., & Ramos-Fernández, J. C. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2512.03288
An extention of Grover's quantum search algorithm (Foundations of Computer Science)
Tanaka, K. (2000) · 数理解析研究所講究録
Lattice embedding into the p-s-degrees of recursive functions
Mochizuki, A. (1999) · Kobe journal of mathematics · doi:10.24546/e0003675
Diophantine equations, lucas sequences and pseudoprimes
Mo, Z. (1993) · Libraries and Cultural Resources (University of Calgary) · doi:10.11575/prism/10820
Αλγόριθμοι πιστοποίησης πρώτων αριθμών σε ενσωματωμένα συστήματα
Τσιφόρα, Α. (2009) · Institutional Repository Hellanicus · doi:10.26215/heal.uoa.4888
The Cost of Statistical Security in Proofs for Repeated Squaring
Freitag, C., & Komargodski, I. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.itc.2023.4
Η μαθηματική απόδειξη στην ιστορία
Ηρακλείδης, Χ. (2007) · Institutional Repository Hellanicus · doi:10.26215/heal.uoa.981
How to Provably Leverage Time in Cryptography
Freitag, C. (2023) · eCommons (Cornell University) · doi:10.7298/f1pr-3092
Generación de primos: una perspectiva computacional
Díaz, R. D., Hernández Encinas, L., & Muñoz Masqué, J. (2010) · DIGITAL.CSIC (Spanish National Research Council (CSIC))
Король, Ю. В. (2016) · INSTITUTIONAL REPOSITORY OF ODESSA NATIONAL UNIVERSITY NAMED I.I. Mechnykova (Odesa I.I.Mechnikov National University)
The cryptocomplexity of four difficult problems
OConnor, L. J. (1988) · Mspace (University of Manitoba)
Emptiness Problem For Extended Regular Expressions
Cai, M. (2003) · SHAREOK (University of Oklahoma; Oklahoma State University; Central Oklahoma University)
Díaz, J. (2004) · Estudis Romànics (Institut d'Estudis Catalans)
Rónyai, L. (1987) · REAL-EOD (Library of the Hungarian Academy of Sciences and the Information Center Oriental Collection)
岡本, 健., 多田, 充., & 宮地, 充. (2001) · Institutional Repositories DataBase (IRDB)
Criptografía RSA: Fundamentos y Desarrollo
Joven Sanagustín, M. T., & Ciria Cosculluela, J. C. (2016) · Zaguan (Universidad de Zaragoza)
Прохоров, Н. П. (2021) · Digital Library of the Belarusian State University (Belarusian State University)
Deling - primtal - kryptografi
Hansen, J. P. (2011)
最近の素数判定アルゴリズム(数式処理における理論と応用の研究)
牧野, 潔. (1993) · Institutional Repositories DataBase (IRDB)
Lattice-Based Post-Quantum Cryptography and Quantum Algorithms
Gärtner, J. (2025) · KTH Publication Database DiVA (KTH Royal Institute of Technology)
Números primos especiales y sus aplicaciones criptográficas
(n.d.) · Tesis Doctorals en Xarxa (Consorci de Serveis Universitaris de Catalunya)
Простые числа и канонические разложения натуральных чисел [Электронный ресурс] / В. М. Ширяев.
Ширяев, В. М. (2013) · BSU Digital Library (Belarusian State University)
Dokazi brez razkritja znanja in njihova uporaba v decentraliziranih sistemih
Ševerkar, N. (2023) · Repository of the University of Ljubljana (University of Ljubljana)
Ramos, J. R. C. M. (2015) · Portuguese National Funding Agency for Science, Research and Technology (RCAAP Project by FCT)
Una applicazione per la valutazione delle prestazioni di architetture parallele a basso consumo
Petrella, A. (2015) · AMS Degree Thesis (University of Bologna)
Fuß, J., & Vymazal, A. (2025) · Springer eBooks · doi:10.1007/978-3-662-70845-3_13
Predicting Mersenne Prime Exponents Using Euler's Quadratic Polynomial with Nearest-Integer RoundingPreprint
Wright, J. (2025) · arXiv (Cornell University) · doi:10.13140/rg.2.2.21565.12004
Theory and applications of verifiable delay functions
Hoffmann, C. (2025) · Institute of Science and Technology Austria · doi:10.15479/at-ista-20920
Díaz, J. (2002) · RACO (Revistes Catalanes amb Accés Obert) (Consorci de Serveis Universitaris de Catalunya)
Urbano, J. M. S. (2024) · UNED repository
Public-Key Encryption in the context of Secure Messaging
Haidar, C. A. (2024) · theses.fr (ABES) · doi:10.70675/cecfe430z3b62z4946z80f7zd316e964b588
Efficient implementation of the Atkin–Morain primality test
Román, G. (2025) · Eötvös Loránd Tudományegyetem · doi:10.15476/elte.2025.324
On a Symmetric Homomorphic Encryption Scheme for Multidimensional Data in IoTPreprint
Upadhyay, M., Choudhuri, M., & Yadav, R. N. (2026) · Research Square · doi:10.21203/rs.3.rs-9747984/v1
On the Dangers of RSA Exponent Transforms
Lau, E., Shea, L., & Heninger, N. (2026) · Lecture notes in computer science · doi:10.1007/978-3-032-26731-3_15
Applications of additive combinatorics methods to some multiplicative problems
Bystrzycki, R. (2019) · Repozytorium Uniwersytetu im. Adama Mickiewicza (Adam Mickiewicz University in Poznań)
Calculating the floor of y**(1/m)Preprint
Gerbessiotis, A. V. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2607.03462
Sankei, D., Njagi, L., Mutembei, J., & Gakii, G. (2026) · Ikonion Journal of Mathematics · doi:10.54286/ikjm.1659107
On the History of the Square-and-Multiply AlgorithmPreprint
Nuh, A., Azarian, M. K., Khormali, O., & Mtimet, G. (2026) · SSRN Electronic Journal · doi:10.2139/ssrn.7237838
Routing to Random Intermediate Destinations
Maggs, B. M., & Leiserson, C. E. (2026) · ACM eBooks · doi:10.1145/3749740.3749758
Implementasi Algoritma Miller-Rabin untuk Pengujian Bilangan Prima Menggunakan Python
Adiyatno, S., Sadno, M., Aswani, A., Wiradarma, A., & Shalihah, R. (2026) · Polygon Jurnal Ilmu Komputer dan Ilmu Pengetahuan Alam · doi:10.62383/polygon.v4i4.1050
Bianchetti, R. (2026) · SSRN Electronic Journal · doi:10.2139/ssrn.7301838
Developments on primality tests based on linear recurrent sequences of degree two
Dutto, S. (2022) · PORTO@Iris
PELL EQUATION. Theory and applications to cryptography
Dutto, S. (2022) · PORTO@Iris
Turan, M. (2024) · Yildiz Technical University - AVESIS
Approximating the Number of Prime Factors Given an Oracle to Euler’s Totient Function
Du, Y., & Volkovich, I. (2021) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.fsttcs.2021.17
New Directions for Primality TestPreprint
Lakshmi Prabha, S., & Janakiraman, T. N. (2014) · arXiv (Cornell University) · doi:10.48550/arxiv.1402.5633
Generación de primos: una perspectiva computacional
Díaz, R. D., Encinas, L. H., & Masqué, J. M. (2010)
Metadata
- Authors
- Miller, G. L.
- Affiliations
- University of Waterloo (CA)
- Corresponding author
- Miller, Gary L.
- ORCID
- Miller, Gary L.
- Venue
- Journal of Computer and System Sciences
- Publisher
- Elsevier BV
- Published
- 1976-12
- Volume
- 13
- Issue
- 3
- Pages
- 300-317
- ISSN
- 0022-0000 (ISSN-L)
- OpenAlex
- W2012857639
- Cited by
- 856
- References
- 18
- Citations by year
- 2026: 28 · 2025: 31 · 2024: 21 · 2023: 22 · 2022: 28 · 2021: 20 · 2020: 27 · 2019: 14 · 2018: 14 · 2017: 10 · 2016: 27 · 2015: 19 · 2014: 37 · 2013: 21 · 2012: 25
- FWCI
- 8.38
- Type
- journal article
- Language
- en
- Open access
- bronze
- doi.org
- Licence
- www.elsevier.com/tdm/userlicense/1.0/ (tdm)
- www.elsevier.com/open-access/userlicense/1.0/ (vor, 13377 d)
- Locations
- Journal of Computer and System Sciences (publishedVersion)
- Funders
- National Science Foundation
- Topics
- Physical Sciences › Mathematics › Algebra and Number Theory › Analytic Number Theory Research
- Physical Sciences › Computer Science › Computational Theory and Mathematics › Complexity and Algorithms in Graphs
- Physical Sciences › Computer Science › Information Systems › Cryptography and Residue Arithmetic
- Keywords
- primality testing, Riemann hypothesis, extended Riemann hypothesis, integer factorization, Euler totient function, computational complexity
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
A language model drew the claims from the paper on 2026-11-21, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).
A second model labelled each claim on 2026-11-21 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).
Cited sources are checked with a language model’s help (qwen3.8-omni-flash).
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.