Power Residues and Primitive Roots
This is Lab 11 from Clint by Hugh Montgomery, edited by Elad Zelingher. All rights reserved to Hugh Montgomery.
The least positive integer such that is called the order of a modulo . (This is Definition 2.6 on p. 97 of NZM.) The order of modulo exists and is finite if ; otherwise it is undefined.
Problem 1
Use PowerTab to determine the order of for each reduced residue class . What orders occur? How many times do they occur? What is the least common multiple of these orders? Repeat this with replaced by some other prime number. Formulate conjectures regarding the situation for a general prime modulus. Compare your findings with Lemma 2.35 and Theorem 2.36 of NZM.
Problem 2
Suppose that has order modulo . How is related to other numbers such that ? Use PowerTab to investigate, for both prime and composite moduli, and then formulate a conjecture. Compare your conjecture with Lemma 2.31 of NZM. Euler's congruence asserts that if . What does this imply concerning the relation between the order of and ? (See Corollary 2.32 of NZM.)
Problem 3
Suppose that has order modulo . What is the order of modulo ? Experiment with several configurations, and formulate a conjecture. Compare with Lemma 2.33 of NZM.
Problem 4
Suppose that has order modulo , and that has order modulo . How large can the order of be? How small? Use pairs taken from your work on Problem 1 above. If , what is the order of modulo ? Study some cases, and formulate a conjecture. Compare your findings with Lemma 2.34 of NZM.
Problem 5
Suppose that has order modulo , that has order modulo , and that . What is the order of modulo ? Try . Try , . Try . Formulate a conjecture (after considering additional examples, if necessary).
Problem 6
Use PowerTab to determine the order of , and of , and use WolframAlpha to determine the value of . Repeat this with , and with . Suppose that . Do you suspect a connection between the order of , and of ? Can you prove your conjecture? (This is found as Problem 14 at the end of of NZM.)
Problem 7
The order of modulo can be determined by calculating until the least is found such that . However, since this may well be of size comparable to , it is usually much faster to use the fact that . After factoring , we search for a minimal divisor of with the property that . Note that if , and if is a prime divisor of , then either , in which case we replace by , or else , in which case the power of dividing is the same as the power of dividing the order of . This technique is discussed on p. 100 of NZM.
To see how the order of 2 modulo 101 would be determined, Use OrderDem. To obtain the result without witnessing the calculation, use Order. Since the first step is to factor in order to calculate , some time may be saved by providing the value of , if this is known. For computing the order of 2 modulo 101, you can provide 100 as the third parameter (which is optional). The economy here can be quite noticeable: if the modulus is a 17 -digit prime , then it will be much faster to tell the machine that , rather than let the machine try to factor by trial division. When the values are given to the program Order, it is not necessary that actually be the value of . All that is required is that . What happens if does not meet this condition? Try using Order with input 2 101 and 35.
Problem 8
The program PrimRoot finds the least positive primitive root of a prime number , by calculating the order of for until an is found of order . Usually this does not take very many trials. Find the least positive primitive root of several primes in this way. For example, use PrimRoot with input 1093. If you wish to find the least primitive root larger than a certain number , enter it as the input . By using the program PrimRoot repeatedly, find all the primitive roots of the prime . How many primitive roots do you find? (Recall Theorem 2.36 of NZM.) What is the biggest gap found between consecutive primitive roots?
Problem 9
The program PrimRoot is not equipped to find primitive roots modulo when , but the program Order is useful in this connection. Suppose that is a primitive root modulo . Then is a primitive root modulo if and only if the order of modulo is . The only other possibility is that the order of modulo is , in which case is a primitive root modulo . (See the proof of Theorem 2.39 of NZM.) Is a primitive root modulo ? Show that is a primitive root of . Is it a primitive root of ? Find the least positive primitive root of the prime . Show that is not a primitive root modulo . (This is the least prime whose least positive primitive root fails to be a primitive root modulo .)
Problem 10
To determine the order of a residue class modulo , we need first a number such that . We could take , but usually a smaller number will do. Let denote the least positive integer such that for all reduced residue classes . This is the Carmichael -function. Its values are determined by the following relations. . If then . If is an odd prime then . If , then .
Use the program Car to determine the value of . Find a reduced residue class modulo 100 that has this maximal order.
Problem 11
For the programmer. Write a program that counts the number of those primes not exceeding for which 2 is a primitive root of . Would you conjecture that there are infinitely many such primes? Does it seem that this set of primes has positive asymptotic density among the set of all primes? That is, do you guess that as for some positive constant ? Gauss conjectured that there exist infinitely many such primes, and E. Artin suggested a particular asymptotic density. However, D. H. Lehmer, A note on primitive roots, Scripta Math. 26 (1963), 117-119 found that numerical evidence does not fit with Artin's conjecture. This led Artin to the realization that one aspect of the situation had been overlooked (see pp. viii, ix of Artin's Collected Works). A modified form of Artin's conjecture is now widely accepted as very likely to be true, especially since C. Hooley, On Artin's conjecture, J. Reine Angew. Math. 225 1967, 209-210, showed that the modified conjecture is a consequence of the Generalized Riemann Hypothesis. The conjectured constant is
where the product is taken over all primes. The number 2 can be replaced by any integer , and the general conjecture is that there is a positive constant such that as , provided that , and that is not a perfect square.