Skip to content
m·amathatlas
ExploreAboutOpen problemsCited authorsMy libraryFeedback
Sign in
FRENES
Loading views…Recent views only, across all languages. Vercel history is unavailable for this page. Repeat visits in the same tab are grouped for 30 minutes.
ShareLinkedInXFacebookWhatsApp
← All open problems
Unanswered question

Explanation for the sum of primitive roots modulo ppp (taken from [−(p−1)/2,(p−1)/2][-(p-1)/2,(p-1)/2][−(p−1)/2,(p−1)/2]) being positive way more often than being negative?

Number theory

Imported on November 28, 2026

The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.

Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.

Problem statement

An earlier version of this question received a few upvotes but no answers on math.stackexchange.

For ppp an odd prime, let S(p)S(p)S(p) denote the sum of the primitive roots modulo ppp, taken from [−p−12,p−12]\left[-\frac{p-1}2,\frac{p-1}2\right][−2p−1​,2p−1​].

When p≡1(mod4)p\equiv 1\pmod 4p≡1(mod4), we have S(p)=0S(p)=0S(p)=0. When p≡3(mod4)p\equiv 3\pmod 4p≡3(mod4), the situation is more interesting. If the primitive roots were 'randomly distributed,' in the sense that the multiplicative property which defines them has no bearing on their additive properties (vague, yes, I know), one would expect S(p)S(p)S(p) to be negative about as often as it is positive.

However, numerical experiments suggest that for all sufficiently large nnn,

#{p≤n:S(p)<0}#{p≤n:S(p)>0}>2.\frac{\#\{p\le n:S(p)<0\}}{\#\{p\le n:S(p)>0\}}>2.#{p≤n:S(p)>0}#{p≤n:S(p)<0}​>2.

Certain more specific residue classes seem to contain way more primes ppp with S(p)<0S(p)<0S(p)<0. For example, there are just three primes p≤2⋅105p\le 2\cdot 10^5p≤2⋅105 with p≡11(mod24)p\equiv 11\pmod{24}p≡11(mod24) and S(p)>0S(p)>0S(p)>0. These are 651716517165171, 116243116243116243 and 190331190331190331.

Questions: Is there some explanation for this phenomenon? Perhaps even a way to compute limits of the form lim⁡n→∞#{p≤n:p≡a(modm),S(p)<0}#{p≤n:p≡a(modm),S(p)>0}?\lim_{n\to\infty}\frac{\#\{p\le n:p\equiv a\pmod{m},S(p)<0\}}{\#\{p\le n:p\equiv a\pmod{m},S(p)>0\}}?limn→∞​#{p≤n:p≡a(modm),S(p)>0}#{p≤n:p≡a(modm),S(p)<0}​? Do these limits even exist?

EDIT: Based on Terry Tao's suggestion (and Greg Martin's, in a comment on my original post), I've tried to account for the known bias quadratic non-residues have. Let S2(p)S_2(p)S2​(p) denote the sum of the quadratic non-residues modulo ppp, taken from [−p−12,p−12]\left[-\frac{p-1}2,\frac{p-1}2\right][−2p−1​,2p−1​]. Instead of comparing S(p)S(p)S(p) to 000, we'll compare S(p)S(p)S(p) to S2(p)S_2(p)S2​(p). At first glance, the bias seems to disappear. I found

#{p≤105:p≡3(mod4),S(p)>S2(p)}=2574;#{p≤105:p≡3(mod4),S(p)<S2(p)}=2220.\begin{align*} \#\left\{p\le 10^5 :p\equiv 3\pmod 4, S(p)>S_2(p)\right\}&=2574;\\ \#\left\{p\le 10^5 :p\equiv 3\pmod 4, S(p)<S_2(p)\right\}&=2220. \end{align*}#{p≤105:p≡3(mod4),S(p)>S2​(p)}#{p≤105:p≡3(mod4),S(p)<S2​(p)}​=2574;=2220.​

However, in more specific residue classes, it is clearly still there. For example:

#{p≤105:p≡11(mod24),S(p)>S2(p)}=170;#{p≤105:p≡11(mod24),S(p)<S2(p)}=1033.\begin{align*} \#\left\{p\le 10^5 :p\equiv 11\pmod {24}, S(p)>S_2(p)\right\}&=170;\\ \#\left\{p\le 10^5 :p\equiv 11\pmod {24}, S(p)<S_2(p)\right\}&=1033. \end{align*}#{p≤105:p≡11(mod24),S(p)>S2​(p)}#{p≤105:p≡11(mod24),S(p)<S2​(p)}​=170;=1033.​

EDIT 2: On second thought, comparing to S2(p)S_2(p)S2​(p) may not be the most natural way of removing the bias quadratic non-residues have. Fix a prime ppp with p≡3(mod4)p\equiv 3\pmod 4p≡3(mod4) and let XXX be a uniformly distributed random variable on [−(p−1)/2,(p−1)/2][-(p-1)/2,(p-1)/2][−(p−1)/2,(p−1)/2]. Is there a significant difference between

P(X prim. root∣(Xp)=−1,X<0)andP(X prim. root∣(Xp)=−1,X>0)?\mathbb{P}\left(X\text{ prim. root} | \left(\frac Xp\right)=-1,X<0\right) \quad\text{and}\quad \mathbb{P}\left(X\text{ prim. root} | \left(\frac Xp\right)=-1,X>0\right)?P(X prim. root∣(pX​)=−1,X<0)andP(X prim. root∣(pX​)=−1,X>0)?

Experimentally, it seems there is. Up to 10410^4104, there are 619619619 primes ppp with p≡3(mod4)p\equiv 3\pmod 4p≡3(mod4) and for 600600600 of these, there are more primitive roots among the negative quadratic non-residues.

Statement and context adapted from MathOverflow · Mastrem

CC BY-SA 4.0 · Formatting adapted; mathematical formulas preserved · Source history

A few useful definitions

Prime number
An integer greater than 1 whose only positive divisors are 1 and itself. Examples include 2, 3, 5 and 7.

Topics : nt.number-theory · analytic-number-theory · primitive-roots

Authors listed by the source : Mastrem

Sources and original status

  • MathOverflow Status in source : unanswered at collection

Last activity on the question : April 27, 2023

Coverage, sources and method

This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.

This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.

Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.

Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.

Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.

OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.

Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.

Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.

  • Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
  • Erdős Problems (teorth) · 622 · Apache-2.0
  • Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
  • OEIS · 18,857 · CC BY-SA 4.0
  • MathOverflow · 19,035 · CC BY-SA (version on each entry)
  • Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)
Report a development or correction
mathatlas

An independent atlas to understand, read, and question research.

The papers present claimed results at different stages of verification.
NewsletterShare feedbackAbout Data and privacy
Created by Sonny Mupfuni