Summary
Today was our last day discussing Chapter 5, and we spent the bulk of the day discussing the idea of index relatively to a given primitive root mod m. The index is akin to the logarithm functions you have seen in your pre-number theory years, and it obeys many of the same rules. We'll use index arithmetic to determine when a given number a is an nth power residue mod m — at least when m has a primitive root.
Defining the Index Function
We have already discussed at length what it means for a residue r to be a primitive root mod m, and we've seen some important properties that primitive roots have. For instance, we've said that when r is a primitive root mod m, then the set
(1)
gives a complete reduced residue system mod m, meaning that for every number a which satisfies
there is a unique
so that
. It is this exponent that we'd like to focus on today.
Definition: Suppose that r is a primitive root mod m and that a is given so that
. Then the index of a relatively to r, written
, is the number between 1 and
which satisfies
.
Notice that the index function is the number-theoretic analogue of a logarithm function: just as
asks for the number to which you raise 10 in order to get 1000, the index function asks for the exponent to which you raise r in order to get a.
Example: Indices mod 17
From our discussion in class on Wednesday, we know that a primitive root r mod 17 is a number which satisfies
(2)
Since 2 is the only prime divisor of 16, this means we can check whether a given number is a primitive root mod 17 by computing its 8th power. For instance, we have
, and hence 3 is a primitive root. Let's compute some indices relative to 3.

We also know that the inverse of 3 is given by
, and since it's easy to see that 6 is the inverse of 3 mod 17, we get
.
Now of course 3 isn't the only primitive root mod 17: there are
such primitive roots. For instance, since
, we know that 5 is a primitive root mod 17. Hence we can also speak of indices relative to 5 (instead of relative to 3). In this case we see that

Notice that the index of 6 relative to 3 is different from the index of 6 relative to 5. Just as with logarithms, the base matters!

Some Properties of Index
There are a few handy properties that this index function have, and many of them are similar to those found in logarithm functions. Here's a summary of the ones that will be especially useful to us:
Lemma: For a primitive root r mod m, and for numbers a,b that are relatively prime to m,
Proof: The first two are easy: that
implies that
, and since we know
by Euler's Theorem, we have
. So let's focus on the second two. We start by calculating

The last equality comes from the definition of the indices of a and b relative to r. But this means that
is an exponent to which you raise r in order to get back ab. Since
is another such exponent, we know that

The proof of the last congruence is similar: since
(7)
we know that
is a power to which you raise r in order to get back an. But
is another such exponent, and so we must have

Example: More Indices mod 17
Using our already computed indicies mod 17, we can now solve for a few more. For instance, since
, we know that
. But since we know
, we get
. We can then use this result to prove that
.
Using Indices to Detect Higher Order Residues
We spent a lot of time talking about quadratic residues, but not much time talking about residues of higher order. Now that we have indices, though, we can solve these problems fairly easily — at least when primitive roots exist.
Example: Solving a Cubic Residue Problem
Suppose that you'd like to solve the equation
. We haven't done lots of problems like this before, so it might seem intimidating. However, notice that

Hence we can solve this problem by solving the linear congruence equation in the "variable"
. Let's try to do it. First, our work above shows that
and that
. Hence our linear congruence is the same as the congruence

Now this equation has a solution if and only if
; since
this divisibility condition is met, and so we know we get exactly 1 solution. Our "usual" techniques for solving linear congruences tells us that
.
In turn this tells us that
is the unique solution to our original equation. 
Example: Solving a Quartic Residue Problem
We can use a similar line of attack to solve the equation
(11)
For fun, this time we'll use 5 as our primitive root. Doing so transforms the equation above into the linear equation
(12)
Since
, our equation becomes

Now this equation has solutions if and only if
, which clearly fails. Since our linear equation in the variable
has no solution, neither does our initial equation
. 
Characterizing Higher Order Residues
These problems show us that index arithmetic can be used to solve higher degree equations, provided that there aren't terms besides the leading term and the constant term. The ideas we just used can be put together in a way to classify precisely those a and n for which the equation
(14)
have a solution — again, at least when we assume that m has a primitive root.
Theorem: Let integers a,m and n be given so that
and so that a primitive root mod m exists. Write
. Then the equation
has a solution if and only if
.
When this congruence holds, then there are precisely d solutions to the initial equation.
Proof: Suppose first that
has a solution, and let's call that solution x. Then we have

To prove the other direction, suppose that
. Now let
, and the previous equation becomes

Since
is an exponent which takes r to 1, we know that
. But this can hold if and only if
, and so we have
. It therefore follows that

has exactly d solutions. Each such solution gives rise to our initial equation
, and so we have proven the result. 
An immediate consequence is the following
Corollary: If a primitive root exists mod m and
, then every reduced residue mod m is the nth power of some unique residue mod m.
Proof: For a given reduced residue a, the previous theorem says that there is exactly one solution to
. 
Example: Answering Higher Order Residue Questions
Suppose that you want to know if 3 is a 5th power mod 11. To answer this question, the previous theorem says that we only need to calculate
(18)
Since
, we know that 3 is not the 5th power of any element mod 11.
Suppose that we want to know if 5 is a 3rd power mod 11. Since
, the previous corollary says that there is a unique solution to
. 






. Then the index of a relatively to r, written
, is the number between 1 and
which satisfies
.

. Then the equation
, then every reduced residue mod m is the nth power of some unique residue mod m.