You are on page 1of 11

Indices and Applications

Justin Stevens

January 28, 2013

Abstract Indices are one of the most overlooked but useful parts of Number Theory. Indices are rarely known, so in this article I would like to take the time to introduce them. The background knowledge you need for this is primitive roots and order. Without these concepts, you will probably get confused throughout this article. Many problems and ideas throughout this article are inspired by [1] and problems and or solutions from [1] are sourced accordingly. The core of this article relies on the problems the reader attempts to do to grasp the concept. Many of the theorems presented in this article were confusing to me until I tried problems involving the theorems and it suddenly made sense. Therefore, the theory in this article is limited to a couple of pages to provide you the necessary knowledge while there is quite a few problems at the end.

A Many thanks to Evan Chen for help with L TEX. Also, many thanks to Kyle Gettig for nding many errors in this document.

Contents
1 Order and Primitive roots 2 What are indices? 3 Some extensions 4 Exercises for the reader 5 Solutions 3 5 6 8 9

Order and Primitive roots

Before I get into a lot of stu about indices, I want to use primitive roots and order in a few problems as indices strongly rely on order and primitive roots. Example 1 ([4]). Let p be a prime. Let g be a primitive root of modulo p. Prove there is no k such that g k+2 g k+1 + 1 g k + 2 (mod p) Proof. If g k+2 g k+1 + 1 (mod p), then g k+1 (g 1) 1 (mod p) and the second gives g k (g 1) 1 (mod p). Note that since gcd(g 1, p) = 1 (from these congruences), and gcd(g k , p) = 1 (from congruences), substitute a = g k , b = g k+1 , and x = g 1. Therefore, ax bx (mod p) = (a b)x 0 (mod p), but gcd(x, p) = 1 = a b 0 (mod p), or g k g k+1 (mod p). However, this implies g k (g 1) 0 (mod p), absurd. This problem didnt really utilize primitive roots; the next one will. Example 2 ([4]). Prove that the product of all primitive roots of p between 1 and p 1 where p > 3 is a prime is 1 mod p. Proof. Lemma 1 ([1]). Prove that if r is a primitive root of the odd prime p, and rr 1 (mod p), then r is a primitive root of the odd prime p. Proof. Note that (rr )d 1 (mod p) for all d. Assume r d 1 (mod p) for some d < (p) = p 1. However, then rd 1 (mod p), contradicting r being a primitive root mod p. Therefore, r is a primitive root of p also.
1) Therefore, we pair all primitive roots into (p2 groups (which is an integer) to get a product of 1. The only other thing we have to note is that 1 and p 1 both cant be a primitive root of p because p > 3.

Example 3 ([5]). Let m = (4p 1)/3, where p is a prime number exceeding 3. Prove that 2m1 has remainder 1 when divided by m. Proof. This condition is the same as om (2)|m1. Note that 4p 1 (mod m) p 4 therefore om (2)|2p. We now want 2p|m 1 or 2p| 4 3 or 2p|4p 4. Note p p that 4 4 0 (mod 2) and 4 4 0 (mod p) from Fermats, therefore by Chinese Remainder Theorem and gcd(2, p) = 1 we are done.

Example 4 ([4]). Let g be a Fibonnaci primitive root i.e a primitive root that satises g 2 g + 1 (mod p) where p is an odd prime. a. Prove that g 1 is also a primitive root of p. b. If p is of the form 4k + 3, prove that (g 1)2k+3 g 2 (mod p), and decude that g 2 is a primitive root of p. Proof. a. We get g (g 1) 1 (mod p) from Fibonnaci primitive root, therefore, using the above lemma, g 1 is also a primitive root of p. b. From the rst part g 1 is a primitive root of p, therefore (g 2 k 1) +1 1 (mod p). Therefore, we want (g 1)2 g 2 (mod p) or (g 2 2g + 1) g 2 (mod p). But g 2 g + 1 so this is true. Now, let d = op (g 2). Therefore, (g 2)d (g 1)d(2k+3) 1 (mod p) (p)|d(2k + 3). This happens when p 1|d(2k + 3). However, gcd(p 1, 2k + 3) = 1 because p = 4k + 3, therefore p 1|d and g 2 is a primitive root of p.

What are indices?

Let r be a primitive root (mod n). A well-known theorem states that the set {r1 , r2 , , r(n) } and the set of integers relatively prime to n are in a one to one correspondence and contain the same elements. Let gcd(b, n) = 1. Then, the smallest positive integer a such that ra b (mod n) is dened as indr (b). As an example, 3 is a primitive root mod 7 (easy to check). Lets say we want to compute the smallest integer such that 3a 5 (mod 7) (or in other terms, ind3 (5)). To do this is a matter of basic computation, 31 3 (mod 7), 32 2 (mod 7), 33 6 (mod 7), 34 4 (mod 7), 35 5 (mod 7), so the answer is 5. A small question the reader may have is why r must be a primitive root (mod n) to imply the existence of an index? Assume that r has order g with g < (n). The set {r1 , r2 , r3 , , rg } make up all possible values of b, which has cardinality g . But the number of possible values for b is (n) and g < (n), so we have arrived at a contradiction. As an example of this, 2 has order 3 mod 7. Therefore, note that 21 2 (mod 7), 22 4 (mod 7), 23 1 (mod 7), 24 2 (mod 7), 25 4 (mod 7), 26 1 (mod 7). Therefore, we cannot nd ind2 (x) for x = 3, 5, 6. Note that 2 is a primitive root of 9. ind2 (2 5) = ind2 (10) which is the smallest value such that 2x 1 (mod 9) or x = 0. Also, ind2 (2) = 1 and ind2 (5) = 5, and ind2 (2) + ind2 (5) ind2 (10) (mod (9)). The following theorems are very fundamental theorems in indices Theorem 1 ([1]). Let r be a primitive root of n. Then, indr (ab) indr (a)+ indr (b) (mod (n)). Also, indr (ak ) k indr (a) (mod (n)). Proof Outline. Both follow from the fact that if r is a primitive root of n and rx ry (mod n), then x y (mod (n)). Try lling in the details yourself, however, if you get stuck, take a look at the solution to Problem 3. [1] The true importance of these theorems will become apparent in the next section.

Some extensions

Example 5. Find all solutions of x3 4 (mod 9) Solution. We rst nd a primitive root of 9. After quick computations, 2 is indeed a primitive root of 9. Therefore, we can take the index base 2 of both sides to give us 3ind2 (x) ind2 (4) (mod (9)). Obviously, ind2 (4) = 2, therefore, 3ind2 (x) 2 (mod 6), which implies that this equation has no solutions. Example 6. Find all solutions of x3 8 (mod 9). Solution. x = 2 is an obvious solution, let us nd all solutions using indices. Again, 2 is a primitive root of 9, so therefore taking ind2 , we get 3ind2 (x) ind2 (8) (mod (9)). Without doing much computation, ind2 (8) = 3, therefore we get 3ind2 (x) 3 (mod 6) = ind2 (x) 1 (mod 2). Since indr (x) (n) where r is a primitive root of n, we are going to get ind2 (x) = 1, 3, 5. The rst case gives x 21 (mod 9) and the second gives x 23 8 (mod 9) and the third gives x 25 32 5 (mod 9) all of which work. From these two examples, we have a path to prove the following two theorems. Theorem 2. The equation xk a (mod n) where there exists a primitive root of n has a solution i gcd(k, (n))|indr (a)| where r is a primitive root of n. [1] Proof Sketch. The proof of this follows from our two examples above using similar methods.Try lling in the details yourself, however, if you get stuck, take a look at the solution to Problem 3. [1] Theorem 3. The equation xk a (mod n) where there exists a primitive
(n)

root of n has a solution i a gcd((n),k)) 1 (mod n). [1] Proof Sketch. The proof of this follows from Theorem 2 and taking indr where r is a primitive root of n. Try lling in the details yourself, however, if you get stuck, take a look at the solution to Problem 3. [1] Example 7. Does there exist an integer x such that x8 9 (mod 11)?

Solution. 9 gcd((11),8) 95 (81)2 9 45 (mod 11) 1 (mod 11), so solutions do exist. The nice thing about this theorem is that in Theorem 2 we have to compute a primitive root of 11 (thankfully 2 works) but for larger numbers it is a tedious work. Using this method, we get a method that involves just using the numbers given to us and computation. Theorem 4. Prove a more general version of the rst part of theorem 1, that is, prove that if n has a primitive root r, then indr (a1 a2 ak ) indr (a1 ) + indr (a2 ) + indr (ak ) (mod (n)) where k 2 is an integer. Proof. Assume it holds for k = p and I prove it holds for k = p + 1 with base case k = 2 being Theorem 1. indr ((a1 a2 ak )(ak+1 )) indr (a1 a2 ak )+indr (mod (n)) from Theorem 1 then use the inductive hyptothesis and the rest is obvious. Example 8. Compute 3501 5221 7318 (mod 17) Solution. First o, 3 is a primitive root of 17 (tedious to calculate but (17) = 16 makes it only a matter of calculating 38 (mod 17)). Therefore, let x = 3501 5221 7318 , and we get ind3 (x) 501 + 221ind3 (5) + 318ind3 (7) (mod 16). Using an index table, we nd ind3 (5) = 5 and ind3 (7) = 11 (note that these could be done by hand too, however, with ugly numbers like this index tables are nice). Therefore, we get ind3 (x) 501+221 5+318 11 (mod 16) or therefore is 5 + 1 + 10 = 16, therefore we get ind3 (x) = 0 = x 1 (mod 17). While this approach is very computational, it is a method that helps when you have incredibly large numbers as bases (such as 101195 103159 (mod 163)). In this case, an index table is also nice to have.

(11)

Exercises for the reader

As said before in the introduction, you will learn most from these problems. Try all the problems carefully, making sure you understand how to use indices on the problems. If you get stuck on any problems, solutions are in the next section but please try to solve the problem before looking at solutions. Problem 1. Solve the equation x5 1 (mod 9). Problem 2. Why do our methods not work for the equation x5 2 (mod 24)? Problem 3. Fill in the details for our proofs of Theorem 1, Theorem 2, and Theorem 3 (the main idea of the proof is given). Problem 4. Solve the equation x4 5 (mod 9) or prove it has no solutions. Problem 5. Compute the remainder when 5299 7100 is divided by 9. (Using indices) Problem 6 ([1]). If p is a prime and gcd(k, p 1) = 1, prove that the integers 1k , 2k , 3k , , (p 1)k form a reduced set of residues modulo p. Problem 7 ([1]). If r and r are both primitive roots of the odd prime p, show that for gcd(a, p) = 1, then indr (a) (indr (a))(indr r) (mod p 1). Problem 8 ([1]). Show that the congruence x2 + 1 0 (mod p) has a solution i p is of the form 4k + 1. Problem 9 ([1]). If r is a primitive root of the odd prime p, show that 1 indr (p a) indr (a) + p 2 (mod p). Problem 10 ([1]). Let r be a primitive root of the odd prime, and let d = gcd(k, p 1). Prove that the values of a for which the congruence p1 xk a (mod p) is solvable are rd , r2d , , r d d .

Solutions

Problem 1. 2 is a primitive root of 9, therefore, take ind2 . We end up with 5ind2 (x) 0 (mod 6) = ind2 (x) = 1 or x 2 (mod 9). Problem 2. There does not exist a primitive root of 24 because 24 = 23 3 and is not one of the desired forms for primitive roots. Problem 3. All of these proofs are from [1] Theorem 1: Note that rindr (ab) ab (mod n) and rindr (a)+indr (b) rindr (a) rindr (b) ab (mod n) therefore because r is a primitive root of n, indr (ab) indr (a) + indr (b) (mod (n)) (well known theorem on primitive roots). Theorem 2: The equation xk a (mod n) implies that taking indr , we get k indr (x) indr (a) (mod (n)) If gcd(k, (n))|indr (a) then we can nd a sucient x such that indr (x) satises this equation.
(n)

Theorem 3: The equation a gcd((n),k) 1 (mod n) is true i indr (a) (n) gcd((n),k) 0 (mod (n)) by taking indr where r is a primitive root of n, which is the same as gcd((n), k )|indr (a) which is the same condition as Theorem 2, so we are done. Problem 4. 5 gcd((9),4) 5 2 53 7 (mod 9) so no solutions exist using Theorem 3. Problem 5. 2 is a primitive root of 9, so take the index base 2 to give us ind2 (5299 7100 ) 299ind2 (5) + 100ind2 (7) (mod 6). Note that 2x 5 (mod 9) is solved when x = 5, therefore ind2 (5) = 5 and 2x 7 (mod 9) is solved when x = 4, therefore ind2 (7) = 4. Therefore, we get (299 5+100 4) (mod 6) 5 (mod 6), or ind2 (5299 7100 ) = 5 = 5299 7100 5 (mod 9). Problem 6. We desire to prove that ak bk (mod p) is impossible where a and b are in {1, 2, 3, 4, , p 1}. Since p is a prime, a primitive root exists, let it be r. Therefore, we get k indr (a) k indr (b) (mod p 1). Since gcd(k, p 1) = 1, we get indr (a) indr (b) (mod p 1). However, looking at the set {r, r2 , , rp1 } we note that this is the same as the set {1, 2, 3, , p 1}, therefore there is only one corresponding value for indr (a) and indr (b) and indr (a) = indr (b) a = b and we are done . Problem 7. We are going to use a similar method as in the outline to theorem 1. Note that (r)indr a a (mod n). Also, note that (rindr r )indr a rindr a a (mod n). Therefore, (r)indr a (r)indr rindr a (mod n) and by a well-known theorem on primitive roots and the fact r is a primitive root of n, this implies indr a indr r indr a (mod (n)). 9
(9) 6

(p)

Problem 8. First o, for 4k +3, by Theorem 3, we must have (1) gcd((p),2) = 1 (mod p) (we can use this theorem because there is a primitive root (p) (mod p) where p is prime). This happens only if gcd( (p),2) 1 (mod 2).
p1 p1 However, we have gcd(2 ,p1) is equal to 2 (because p = 4k + 3) which is 2k + 1 and 4k + 3 doesnt work. (p) Now, use theorem 3 for 4k + 1 to give us a desired (1) gcd((p),2) (p) 1 (mod p). Note that this holds only if gcd( (p),2) and (p) = 4k and

gcd((p), 2) = 2, so therefore we get it only works for 4k + 1 .

(p) gcd((p),2)

= 2k and we have proved


p1

Problem 9. This condition is the same as rindr (pa) rindr (a)+ 2 (mod p) using the converse of theorem 1. The LHS is the same as p a and the RHS is the same as a (1) = a, so therefore we are done . Problem 10. By Theorem 3, we must have a d 1 (mod p). Therefore, p1 a = rd , r2d , , r d d all work (should be obvious). Also, from Lagrange, p) (p) p1 there are at most ( d solutions, and we have proven there are d = d p) solutions above, therefore there are exactly ( d solutions which are the ones above.
(p)

10

References
[1] Burton, David M. Section 8.4. Elementary number theory. Boston: Allyn and Bacon, 1976. [2] Primitive Roots and Indices. Primitive Roots and Indices. 22 Jan.2013 http://aubuchon.jsc.vsc.edu/numberTheoryNotes16PrimitiveRootsIndices.htm. [3] alozano. using primitive roots and index to solve congruences (version 1). PlanetMath.org. Freely available athttp://planetmath.org/UsingPrimitiveRootsAndIndexToSolveCongruences.html. [4] Peter Vandendriessche, and Hojoo Lee. Problems Elementary Number Theory. http://www.math.muni.cz/ bulik/vyuka/pen-20070711.pdf. (Note: All these problems are from various sources which can be found in this document, look at section 3.1) [5] WOOT: Worldwide Online Olympiad Training. WOOT. 27 Jan. 2013 http://www.artofproblemsolving.com/School/woot.php.

11

You might also like