Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

number theory senior

Problem

Given a prime and an integer , we say that is a if the set contains exactly one element congruent to each of .

For example, is a primitive root because , and this list contains every residue from to exactly once.

However, is not a primitive root because , and this list does not contain every residue from to exactly once.

What is the sum of all integers in the set that are primitive roots ?
Solution
Obviously, is not a primitive root (its powers are all congruent to !).

Examining the powers of , we see that with repetition from this point onward. Since the powers of do not include all residues from to , we see that is not a primitive root.

The logic of this example can be generalized. If is an integer and , then the powers of repeat on a cycle of length at most . Therefore, for to be a primitive root, it is necessary that for all positive smaller than . Conversely, if for some positive smaller than , then is not a primitive root . As examples, and are not primitive roots , because and .

This leaves and as candidates. Checking the powers of and modulo , we see that Thus, are primitive roots of , so the desired sum is .
Final answer
8