Small prime quadratic residues and non-residues under GRH

For an odd prime p, let rp be the least prime that is a quadratic residue modulo p, and let np be the least quadratic non-residue. For a fundamental discriminant D other than 1, let rD be the least prime that splits in the quadratic field of discriminant D. All theorems assume the Riemann hypothesis for zeta and for the quadratic Dirichlet L-functions involved, which is a part of the generalized Riemann hypothesis (GRH). The paper proves nothing about GRH and uses no proof of it. rp < (log p)2 for every odd prime p except 3, 5 and 163. It follows that rp ≤ (41/(log 163)2) (log p)2 for every prime p ≥ 7, with equality only for p = 163. np ≤ (3/(log 7)2) (log p)2 for every prime p ≥ 5, with equality only for p = 7, and np < 0.765 (log p)2 for every prime p ≥ 11. For every prime p ≥ 7 except 163, there are a prime residue and a prime non-residue modulo p below (log p)2. rD < (6/5) (log |D|)2 for every fundamental discriminant D other than 1, except D = −3, −4, 5, 8, 12 and −163. It follows that rD ≤ (41/(log 163)2) (log |D|)2 if |D| > 12, with equality only for D = −163. The proofs use an explicit formula with autocorrelations of step functions. The inequalities for large p and |D| are certified with outward-rounded ball arithmetic. Exact integer searches cover the other cases, up to 1018 for p = 3 mod 8. Three programs give identical lists of candidates. For large p, constants below 1 were already known under GRH for both problems (Carneiro, Milinovich, Quesada-Herrera and Ramos, with limsup below 0.7615). Lamzouri, Li and Soundararajan prove np < (log p)2 for p ≥ 5. Bounds of Bach and Sorenson (which we did not read; GPT-6 Pro did) and of Grenié and Molteni already give the inequalities with the constants 6/5 and 41/(log 163)2 for very large |D|. The bound rp < (5/2) (log p)2 for p ≥ 7 follows from published results and a small finite check. Our searches repeat a part of earlier sieve computations, including tables of Jacobson and Williams. To the best of our knowledge, the statements of results 1 to 4, with their stated constants and exceptions, have not appeared before; our literature search was not exhaustive. Section 1 of the paper lists the credits and who read what. AI use: GPT-6 Pro (OpenAI) suggested the original question, with the constant 5/2. Claude (Anthropic) found and wrote the proofs, and wrote the programs and the text of the paper. GPT-6 Pro and a separate instance of Claude reviewed the work. The separate instance of Claude also wrote one of the three search programs, and GPT-6 Pro read part of the literature. OpenAI's Codex was not used. There has been no human peer review, and there is no Lean formalization of these theorems. Files: the paper (PDF), and an archive with its LaTeX source, the programs, the certificates and the recorded outputs. License: CC BY 4.0 for the paper and README files, and MIT for the programs and data.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-29
DOI
https://doi.org/10.5281/zenodo.24655313
Primary Topic
Analytic Number Theory Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Small prime quadratic residues and non-residues under GRH

Yi Yu
Zenodo (CERN European Organization for Nuclear Research)
Analytic Number Theory Research
preprint

Small prime quadratic residues and non-residues under GRH

Yi Yu
preprint en

Abstract

For an odd prime p, let rp be the least prime that is a quadratic residue modulo p, and let np be the least quadratic non-residue. For a fundamental discriminant D other than 1, let rD be the least prime that splits in the quadratic field of discriminant D. All theorems assume the Riemann hypothesis for zeta and for the quadratic Dirichlet L-functions involved, which is a part of the generalized Riemann hypothesis (GRH). The paper proves nothing about GRH and uses no proof of it. rp < (log p)2 for every odd prime p except 3, 5 and 163. It follows that rp ≤ (41/(log 163)2) (log p)2 for every prime p ≥ 7, with equality only for p = 163. np ≤ (3/(log 7)2) (log p)2 for every prime p ≥ 5, with equality only for p = 7, and np < 0.765 (log p)2 for every prime p ≥ 11. For every prime p ≥ 7 except 163, there are a prime residue and a prime non-residue modulo p below (log p)2. rD < (6/5) (log |D|)2 for every fundamental discriminant D other than 1, except D = −3, −4, 5, 8, 12 and −163. It follows that rD ≤ (41/(log 163)2) (log |D|)2 if |D| > 12, with equality only for D = −163. The proofs use an explicit formula with autocorrelations of step functions. The inequalities for large p and |D| are certified with outward-rounded ball arithmetic. Exact integer searches cover the other cases, up to 1018 for p = 3 mod 8. Three programs give identical lists of candidates. For large p, constants below 1 were already known under GRH for both problems (Carneiro, Milinovich, Quesada-Herrera and Ramos, with limsup below 0.7615). Lamzouri, Li and Soundararajan prove np < (log p)2 for p ≥ 5. Bounds of Bach and Sorenson (which we did not read; GPT-6 Pro did) and of Grenié and Molteni already give the inequalities with the constants 6/5 and 41/(log 163)2 for very large |D|. The bound rp < (5/2) (log p)2 for p ≥ 7 follows from published results and a small finite check. Our searches repeat a part of earlier sieve computations, including tables of Jacobson and Williams. To the best of our knowledge, the statements of results 1 to 4, with their stated constants and exceptions, have not appeared before; our literature search was not exhaustive. Section 1 of the paper lists the credits and who read what. AI use: GPT-6 Pro (OpenAI) suggested the original question, with the constant 5/2. Claude (Anthropic) found and wrote the proofs, and wrote the programs and the text of the paper. GPT-6 Pro and a separate instance of Claude reviewed the work. The separate instance of Claude also wrote one of the three search programs, and GPT-6 Pro read part of the literature. OpenAI's Codex was not used. There has been no human peer review, and there is no Lean formalization of these theorems. Files: the paper (PDF), and an archive with its LaTeX source, the programs, the certificates and the recorded outputs. License: CC BY 4.0 for the paper and README files, and MIT for the programs and data.

Zenodo (CERN European Organization for Nuclear Research)
New York University (US)
Analytic Number Theory Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon