How often two generates every remainder
Worth reading first: One residue whose powers are all of them · The row that proves a prime.
One residue whose powers are all of them proved that every prime has a primitive root: a number whose powers, taken modulo , run through all non-zero remainders before they repeat. It proved more: there are exactly of them. It did not say which numbers they are, and in particular it did not say whether is one.
Sometimes it is and sometimes it is not. Modulo the powers of are , every remainder once: is a primitive root. Modulo they are and round again, stuck in a cycle of three: it is not. The question this essay measures is how often — for what share of the primes is a primitive root — and the answer is a constant that nobody has been able to prove is right.
Among the primes up to two million, is a primitive root for . The running share in the figure wanders among the first few thousand primes and then settles, and the line it settles on was drawn in 1927 by Emil Artin, from an argument about independent accidents.
A question Gauss asked about decimals
The question is older than Artin and began with long division. The decimal expansion of repeats with a period equal to the order of modulo — the number of steps before the remainders of the division repeat — so has the longest possible period, digits, exactly when is a primitive root modulo . has period six; has period sixteen; has period two.
Carl Friedrich Gauss tabulated such periods in his Disquisitiones Arithmeticae of 1801 and asked whether infinitely many primes have the full period. That is the question for the base , and the base changes nothing essential. For the base it asks how often a binary fraction has the full period, or equivalently how often a shift register of a certain kind cycles through every state. The answer, measured, is a little over three primes in eight, for either base.
Stuck in a smaller cycle
The powers of modulo form a cycle whose length — the order of — divides , by Fermat’s theorem. The powers miss some remainders exactly when the order is a proper divisor of , and that happens exactly when, for some prime dividing , the power is already .
That last condition has a meaning: says that is a -th power modulo — that some number, raised to the -th power, leaves the same remainder as . So fails to be a primitive root modulo exactly when there is a prime dividing for which is a -th power modulo . For that is the familiar question of whether is a square, a quadratic residue, which the supplements to reciprocity answer: it is, exactly when leaves or on division by .
Artin’s product
Artin’s argument treats each of these obstructions as an accident with a definite chance.
For a prime , two things must happen for to spoil . First, must divide ; among the primes, by Dirichlet’s theorem on primes in arithmetic progressions, that happens for a share of them. Second, given that, must be one of the -th powers, which are a fraction of the non-zero remainders; if behaves like a typical remainder, that has chance . So the chance that spoils is , and if the accidents for different are independent, the chance that none of them happens is
Artin’s constant. The first factor, for , is ; the second, for , is ; the factors approach one quickly, and the product converges to about three in eight. The figure computes it over the primes up to two hundred thousand, with an estimate of the rest, and draws it as the dashed line the measured share settles onto.
The argument is a heuristic, not a proof, and it has two soft spots. It assumes is a “typical” remainder for the purposes of being a -th power, and it assumes the accidents for different are independent. For the base both assumptions turn out to be harmless — the measured share agrees with to the precision two million allows. For other bases, one of them fails.
Eight bases, and the one that is different
For most bases the measured share is near : , , , and all sit on Artin’s constant within the fluctuation two million primes allow. The base does not. It is a primitive root for of the primes, well outside any reasonable fluctuation, and is slightly high too.
The discrepancy was discovered exactly this way. In 1957 Derrick Henry Lehmer and Emma Lehmer computed, on one of the first electronic computers, how often small bases were primitive roots, and found that some did not match Artin’s constant. Hans Heilbronn found the reason, and Artin accepted the correction: for a base whose squarefree part leaves on division by , the density is not but
which for is — the measured to four figures. The figure computes the corrected prediction and the measurement independently, and they agree for every base drawn.
Drawn together, the two bases make the correction visible. Both running shares wander among the small primes, and both settle — but onto different lines, two percentage points apart, which by two million primes is many times the size of the fluctuation. The gap does not close as more primes are counted, which is what distinguishes a wrong constant from a slow convergence, and the corrected constant for sits exactly where its curve settles.
Two accidents that are one
The reason is that, for the base , the accidents for and are not independent.
For to be a fifth power modulo , the prime must divide , so leaves on division by . And by quadratic reciprocity, is a square modulo exactly when is a square modulo — which a prime leaving certainly is. So whenever is a fifth power, it is also a square. The figure counts: is a square for half the primes, a fifth power for about one in twenty, and both for the same one in twenty, where independence would predict one in forty.
Artin’s product counted the two ways for to fail as if they could happen separately, and so subtracted their overlap as if it were small. It is total, so fewer primes are lost than the product says, and is a primitive root more often. The base is entangled with the quadratic field built from , which lives inside the field built from fifth roots of unity, and every base whose squarefree part leaves on division by has the same kind of entanglement with its own square root. Bases like , and have none, and for them the independence Artin assumed is true.
How much the powers miss
A primitive root misses nothing. When is not one, its powers miss a fraction of the remainders, and the index — divided by the order — measures how many times over.
The index is for of the primes, for , for , and smaller shares after that — but not in a steadily falling pattern. Even indices are commoner than odd ones of similar size, because the factor in the index is decided by whether is a square, which is decided by modulo , and that is not an independent accident either. Each index has its own density, given by its own Artin-type product with its own corrections, and every index occurs for a positive share of the primes if the corresponding heuristics are right.
The smallest primitive root
A companion question asks not how often a given number works but how soon one does: for each prime, what is the smallest primitive root?
Among the primes up to two million, is the smallest primitive root for of them — the same , since whenever works it is the smallest candidate. After that come for primes, for , then , and . The average smallest primitive root over all primes is , and the largest in the range is , needed for the prime . Primitive roots are almost always tiny, and the Artin-type densities explain why: each small number has a fixed chance of working, the chances do not fall to zero, and so the first success comes quickly.
What can be proved about the worst case is far weaker than what is seen. David Burgess’s estimates show that the smallest primitive root is at most about , times a slowly growing factor; under the generalised Riemann hypothesis Victor Shoup showed it is at most a power of . The truth, as far as computation can tell, is closer to itself — and no method comes near proving it.
Where a generator of every remainder is useful
Primitive roots are not only a curiosity of number theory; they are the working part of several constructions that need to visit every remainder once.
A multiplicative congruential generator — multiply by and reduce modulo a prime at every step — cycles through all non-zero remainders exactly when is a primitive root, which is the longest period such a generator can have. The planes a recurrence cannot leave showed what else such a generator’s output does, and choosing its multiplier starts with choosing a primitive root. The Diffie–Hellman key exchange, the first public-key method, publishes a large prime and a primitive root, and relies on the difficulty of recovering an exponent from a power. And the Welch construction of Costas arrays — patterns of dots used in radar and sonar, with no two displacement vectors equal — places a dot in row of column for a primitive root , which works because the powers of a primitive root never repeat within a period.
In each case the question “is a primitive root?” is answered by factoring and checking the -th powers, exactly as the figures do. And in each case the density measured here is why finding one is quick: trying , , , … finds a primitive root within a handful of attempts for almost every prime.
What is proved
The heuristic has been turned into a theorem in two ways, neither complete.
Christopher Hooley proved in 1967 that Artin’s conjecture, with Heilbronn’s correction, is true if the generalised Riemann hypothesis holds — the statement about the zeros of the functions that count primes in arithmetic progressions and in the fields generated by roots of unity and roots of . The hypothesis supplies exactly what the heuristic assumed: that the primes spread evenly enough over the conditions “ divides and is a -th power” that the inclusion–exclusion over all converges to the product. Counting what has no formula described the ordinary Riemann hypothesis as a statement about how evenly the primes are spread; Hooley’s proof needs that evenness in infinitely many number fields at once.
Without the hypothesis, much less is known. Rajiv Gupta and Ram Murty showed in 1984 that some specific base is a primitive root for infinitely many primes, and Roger Heath-Brown sharpened their method in 1986 to show that at least one of 2, 3 and 5 is a primitive root for infinitely many primes. In fact the theorem shows that at most two prime numbers can fail to be primitive roots for infinitely many primes — but it cannot say which two, and so it cannot name a single number that is known, unconditionally, to be a primitive root for infinitely many primes.
Why the question matters for proving primes
The two ways of recognising a prime that the neighbouring essays describe differ in whether they need a primitive root, and Artin’s question sits exactly on the difference.
Lucas’s test, the basis of the certificates in an order that proves a prime, proves prime by exhibiting a number whose order modulo is — a primitive root. Its practical speed rests on finding one quickly, and the densities here are why that works: a small base succeeds for a fixed share of primes, so a few tries suffice. The test of the row that proves a prime needs no primitive root at all; it checks a polynomial identity that every prime satisfies. That independence from Artin’s question is part of why its correctness could be proved unconditionally while a deterministic version of Lucas’s test, which would need a guaranteed small primitive root, still leans on the Riemann hypothesis. The same necklace count that gives Fermat’s theorem underlies both; they part company over whether a single number must be found that does all the work.
What two million primes cannot settle
The figures measure; they prove nothing about infinity. A share of among the primes up to two million is compatible with the true density being , and equally compatible with the share drifting slowly elsewhere at astronomically large primes. The agreement with to four figures is strong evidence and no more.
Every primitive-root test is exact. For each prime, is factored completely by a table of smallest prime factors, and is declared a primitive root only after has been checked for every prime dividing ; no orbit is walked and no rounding is involved.
The fluctuation band is a statistician’s, not a number theorist’s. The figures accept a measured share as agreeing with a prediction when it is within four standard deviations of a coin-tossing model, which treats primes as independent trials. They are not independent, and the band is a yardstick for the eye rather than a statement about primes.
Still open: whether 2 works infinitely often
Is a primitive root modulo infinitely many primes? Every computation says it is, for three primes in eight; Hooley’s theorem says it is if the generalised Riemann hypothesis holds; Heath-Brown’s says that , or is. Unconditionally, for itself, it is not known — not the density, not even that the set of such primes is infinite.
The obstacle is the one an order that proves a prime ran into in its closing question. Showing that is a primitive root for infinitely many primes means controlling, for large primes , how many primes have dividing and a -th power — primes in progressions with enormous moduli — and that control is exactly what the Riemann hypothesis would provide and what no other method has yet delivered.
Accidents that are not independent
The habit worth keeping is how the prediction was repaired.
Artin’s constant came from treating each way for to fail as a separate accident with its own chance, and multiplying. That is the natural first model of any arithmetic property, and for it is right. For it is wrong, and the error was not in the chances but in the independence: two of the accidents were the same accident, tied together by quadratic reciprocity. A product of probabilities is only as good as the independence behind it, and the corrections to Artin’s conjecture are a catalogue of the hidden dependences among primes — each one a piece of algebraic number theory that the naive count did not know it needed.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- Counting one rectangle, twice — both name primes, quadratic reciprocity, quadratic residue
- The primes on a spiral, and a pattern nobody ordered — both name conjecture, density, primes
- Always one before the double — both name density, primes
- Numbers that wrap — both name fermats little theorem, primes
- One sum, squared two ways — both name quadratic reciprocity, quadratic residue
- The primes are what is left over — both name density, primes
Named objects
A dashed tag is an object no other essay names yet.
ConjectureDensityFermats little theoremIndependenceOrder of an elementPrimesQuadratic reciprocityQuadratic residue