# 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 n^{th} 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

gives a complete reduced residue system mod *m*, meaning that for every number *a* which satisfies $(a,m) = 1$ there is a unique $1 \leq j \leq \phi(m)$ so that $r^j \equiv a \mod{m}$. It is this exponent that we'd like to focus on today.

Definition: Suppose that

ris a primitive root modmand thatais given so that $(a,m)=1$. Then the index ofarelatively tor, written $\mbox{ind}_r(a)$, is the number between 1 and $\phi(m)$ which satisfies$r^{\mbox{\tiny{ind}}_r(a)} \equiv a \mod{m}$.

Notice that the index function is the number-theoretic analogue of a logarithm function: just as $\mbox{log}_{10}(1000)$ 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

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 8^{th} power. For instance, we have

$3^8 \equiv 9^4 \equiv 81^2 \equiv 13^2 \equiv 16 \mod{17}$, 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 $3^{\phi(17)-1} = 3^{16}$, and since it's easy to see that 6 is the inverse of 3 mod 17, we get $\mbox{ind}_3(6) = 16$.

Now of course 3 isn't the only primitive root mod 17: there are $\phi(\phi(17)) = 8$ such primitive roots. For instance, since $5^8 \equiv 16 \mod{17}$, 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

(4)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!

$\square$

## 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

rmodm, and for numbersa,bthat are relatively prime tom,

- $\mbox{ind}_r(r) = 1$
- $\mbox{ind}_r(1) = \phi(m)$
- $\mbox{ind}_r(ab) \equiv \mbox{ind}_r(a)+\mbox{ind}_r(b) \mod{\phi(m)}$
- $\mbox{ind}_r(a^n) \equiv n\cdot \mbox{ind}_r(a) \mod{\phi(m)}$

Proof: The first two are easy: that $r^1 = r$ implies that $\mbox{ind}_r(r) = 1$, and since we know $r^{\phi(m)} \equiv 1 \mod{m}$ by Euler's Theorem, we have $\mbox{ind}_r(1) = \phi(m)$. So let's focus on the second two. We start by calculating

(5)The last equality comes from the definition of the indices of *a* and *b* relative to *r*. But this means that $\mbox{ind}_r(a) + \mbox{ind}_r(b)$ is an exponent to which you raise *r* in order to get back *ab*. Since $\mbox{ind}_r(ab)$ is another such exponent, we know that

The proof of the last congruence is similar: since

(7)we know that $n\mbox{ind}_r(a)$ is a power to which you raise *r* in order to get back *a*^{n}. But $\mbox{ind}_r(a^n)$ 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 $10^2 \equiv 100 \equiv 15 \mod{17}$, we know that $\mbox{ind}_3(15) \equiv \mbox{ind}_3(10^2) \equiv 2 \mbox{ind}_3(10) \equiv 6 \mod{16}$. But since we know $\mbox{ind}_3(15) \equiv \mbox{ind}_3(3)+\mbox{ind}_3(5)$, we get $\mbox{ind}_3(5) \equiv 6-1 \equiv 5 \mod{16}$. We can then use this result to prove that $\mbox{ind}_3(8) \equiv \mbox{ind}_3(25) \equiv 2 \mbox{ind}_3(5) \equiv 10 \mod{16}$.

# 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 $15x^3 \equiv 13 \mod{17}$. We haven't done lots of problems like this before, so it might seem intimidating. However, notice that

(9)Hence we can solve this problem by solving the linear congruence equation in the "variable" $\mbox{ind}_3(x)$. Let's try to do it. First, our work above shows that $\mbox{ind}_3(15) \equiv 6 \mod{16}$ and that $\mbox{ind}_3(13) \equiv 4 \mod{16}$. Hence our linear congruence is the same as the congruence

(10)Now this equation has a solution if and only if $(3,16) \mid -1$; since $(3,16) = 1$ this divisibility condition is met, and so we know we get exactly 1 solution. Our "usual" techniques for solving linear congruences tells us that $\mbox{ind}_3(x) = 10$.

In turn this tells us that $x = 3^{10} \mod{17}$ is the unique solution to our original equation. $\square$

#### 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 $\mbox{ind}_5(8) \equiv 2 \mod{16}$, our equation becomes

(13)Now this equation has solutions if and only if $(4,16) \mid -2$, which clearly fails. Since our linear equation in the variable $\mbox{ind}_5(x)$ has no solution, neither does our initial equation $8x^4 \equiv 1 \mod{17}$. $\square$

# 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

have a solution — again, at least when we assume that *m* has a primitive root.

Theorem: Let integers

a,mandnbe given so that $(a,m) = 1$ and so that a primitive root modmexists. Write $d = (n,\phi(m))$. Then the equation$x^n \equiv a \mod{m}$

has a solution if and only if

$a^{\frac{\phi(m)}{d}} \equiv 1 \mod{m}$.

When this congruence holds, then there are precisely

dsolutions to the initial equation.

Proof: Suppose first that $x^n \equiv a \mod{m}$ has a solution, and let's call that solution *x*. Then we have

To prove the other direction, suppose that $a^{\frac{\phi(m)}{d}} \equiv 1 \mod{m}$. Now let $b = \ind_r(a)$, and the previous equation becomes

(16)Since $\frac{\phi(m)b}{d}$ is an exponent which takes *r* to 1, we know that $\phi(m) \mid \frac{\phi(m)b}{d}$. But this can hold if and only if $\frac{b}{d} \in \mathbb{Z}$, and so we have $d \mid b$. It therefore follows that

has exactly *d* solutions. Each such solution gives rise to our initial equation $x^n \equiv a \mod{m}$, and so we have proven the result. $\square$

An immediate consequence is the following

Corollary: If a primitive root exists mod

mand $(n,\phi(m)) = 1$, then every reduced residue modmis the n^{th}power of some unique residue modm.

Proof: For a given reduced residue *a*, the previous theorem says that there is exactly one solution to $x^n \equiv a \mod{m}$. $\square$

#### Example: Answering Higher Order Residue Questions

Suppose that you want to know if 3 is a 5^{th} power mod 11. To answer this question, the previous theorem says that we only need to calculate

Since $3^2 \not\equiv 1 \mod{11}$, we know that 3 is not the 5^{th} power of any element mod 11.

Suppose that we want to know if 5 is a 3^{rd} power mod 11. Since $(3,\phi(11)) = 1$, the previous corollary says that there is a unique solution to $x^3 \equiv 5 \mod{11}$. $\square$