12
MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005 Department of Mathematical and Statistical Sciences University of Alberta Question 1. Find integers x and y such that 314x + 159y =1. Solution: Using the Euclidean algorithm to find the greatest common divisor of a = 314 and b = 159, we have 314 = 1 · 159 + 155 159 = 1 · 155 + 4 155 = 38 · 4+3 4=1 · 3+1 3=3 · 1+0 and the last nonzero remainder is (314, 159) = 1. Working from the bottom up, we have 1=4 - 3 =4 - (155 - 38 · 4) = 39 · 4 - 155 = 39 · (159 - 155) - 155 = 39 · 159 - 40 · 155 = 39 · 159 - 40(314 - 159) = (-40) · 314 + 79 · 159 and therefore, 1=(-40) · 314 + 79 · 159, and one solution is x = -40,y = 79. Question 2. Let n be a composite positive integer and let p be the smallest prime divisor of n. Show that if p>n 1/3 , then n/p is prime. Solution: Suppose p>n 1/3 and that n/p is composite, so that n = p · a · b, where 1 < a, b < n. Let q and r be any prime divisors of a and b, respectively, then q and r are also prime divisors of n, so that q p and r p. This implies that p 3 p · q · r p · a · b = n, that is, p n 1/3 , which is a contradiction. Therefore, n/p is prime.

MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Embed Size (px)

Citation preview

Page 1: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005

Department of Mathematical and Statistical Sciences University of Alberta

Question 1.

Find integers x and y such that314x + 159y = 1.

Solution: Using the Euclidean algorithm to find the greatest common divisor of a = 314 and b = 159, wehave

314 = 1 · 159 + 155

159 = 1 · 155 + 4

155 = 38 · 4 + 3

4 = 1 · 3 + 1

3 = 3 · 1 + 0

and the last nonzero remainder is (314, 159) = 1.

Working from the bottom up, we have

1 = 4 − 3

= 4 − (155 − 38 · 4) = 39 · 4 − 155

= 39 · (159 − 155)− 155 = 39 · 159− 40 · 155

= 39 · 159− 40(314− 159) = (−40) · 314 + 79 · 159

and therefore,1 = (−40) · 314 + 79 · 159,

and one solution is x = −40, y = 79.

Question 2.

Let n be a composite positive integer and let p be the smallest prime divisor of n. Show that if p > n1/3,then n/p is prime.

Solution: Suppose p > n1/3 and that n/p is composite, so that n = p · a · b, where 1 < a, b < n. Let q andr be any prime divisors of a and b, respectively, then q and r are also prime divisors of n, so that

q ≥ p and r ≥ p.

This implies thatp3 ≤ p · q · r ≤ p · a · b = n,

that is, p ≤ n1/3, which is a contradiction. Therefore, n/p is prime.

Page 2: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 3.

Find all positive solutions in integers to the system of linear equations

x + y + z = 31

2x + 2y + 3z = 41.

Solution: Solving the first equation, we get the two-parameter family of solutions

x = 31− t, y = t − s, z = s

for s, t ∈ Z. Since this must also be a solution of the second equation, we must have

2(31 − t) + 2(t − s) + 3s = 41,

that is, s = −21. Therefore, there are no positive solutions to the given system.

Question 4.

Prove or disprove that if a2 ≡ b2 (mod m), then a ≡ b (mod m) or a ≡ −b (mod m).

Solution: The statement is false, as can be seen by taking m = 24, a = 8 and b = 4, then

a2 ≡ 82 ≡ 64 ≡ 16 ≡ 42 ≡ b2 (mod 24),

but 8 6≡ 4 (mod 24).

Question 5.

Find all positive integers m such that 1066 ≡ 1776 (mod m).

Solution: We only need find all positive divisors of 1776− 1066 = 710, and these are

1, 2, 5, 10, 71, 142, 355, 710.

Question 6.

Show that the difference of two consecutive cubes is never divisible by 5.

Solution: For any integer n, we have

(n + 1)3 − n3 = 3n(n + 1) + 1,

and it is easily seen that n(n + 1) is congruent to 0, 1, or 2 modulo 5, so that (n + 1)3 − n3 can only becongruent to 1, 2, or 4 modulo 5.

Question 7.

Find the smallest odd integer n, with n > 3, such that 3∣∣n, 5

∣∣n + 2, and 7

∣∣n + 4.

Solution: We have to solve the simultaneous congruences

n ≡ 3 (mod 3)

n ≡ 3 (mod 5)

n ≡ 3 (mod 7)

and since 3, 5, and 7 are pairwise relatively prime, their smallest common multiple is 3 · 5 · 7 = 105, and wemay take n = 3 + 105 = 108.

Page 3: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 8.

(a) Find a positive integer n such that 32∣∣n, 42

∣∣ n + 1, and 52

∣∣n + 2.

(b) Can you find a positive integer n such that 22∣∣n, 32

∣∣ n + 1, and 42

∣∣n + 2.

Solution:

(a) We solve the following simultaneous congruences using the Chinese remainder theorem:

n ≡ 0 (mod 9)

n ≡ −1 ≡ 15 (mod 16)

n ≡ −2 ≡ 23 (mod 25).

Here

a1 = 0, a2 = 15, a3 = 23

m1 = 9, m2= 16, m3 = 25,

andM1 = 16 · 25 = 400, M2 = 9 · 25 = 225, M3 = 9 · 16 = 144.

Also, solving the congrences

M1y1 ≡ 1 (mod m1)

M2y2 ≡ 1 (mod m2)

M3y3 ≡ 1 (mod m3)

for the inverses y1, y2, and y3, we have

y1 ≡ 7 (mod 9), y2 ≡ 1 (mod 16), y3 ≡ 4 (mod 25),

and the unique solution modulo 9 · 16 · 25 is given by

n = a1M1y1 + a2M2y2 + a3M3y3 = 15 · 225 · 1 + 23 · 144 · 4 = 3375 + 13248 = 16623.

(b) There does not exist a positive integer n such that

22∣∣ n, 32

∣∣ n + 1, and 42

∣∣ n + 2,

since if such an n existed, then we would have

4∣∣n and 16

∣∣n + 2,

however, this implies that 4∣∣n + 2 − n = 2, which is a contradiction.

Page 4: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 9.

What is the last digit of 7355 ?

Solution: We have

72 ≡ 9 (mod 10)

73 ≡ 3 (mod 10)

74 ≡ 1 (mod 10)

and 355 = 88 · 4 + 3, so that

7355 ≡(74

)88· 73 ≡ 3 (mod 10),

and the last digit of 7355 is a 3.

Question 10.

What is the remainder when 314162 is divided by 165 ?

Solution: We have the following prime power decompositions:

314 = 157 · 2 and 165 = 3 · 5 · 11

and the following congruences:

22 ≡ 1 (mod 3)

24 ≡ 1 (mod 5)

28 ≡ 1 (mod 11)

so that 3∣∣ 28 − 1, 5

∣∣ 28 − 1, and 11

∣∣28 − 1, and since the integers 3, 5, and 11 are pairwise relatively prime,

then 165∣∣28 − 1 also, that is,

28 ≡ 1 (mod 165).

We also have the congruences:

157 ≡ 1 (mod 3)

1574 ≡ 1 (mod 5)

1575 ≡ 1 (mod 11)

and again, since 3∣∣ 15720 − 1, 5

∣∣ 15720 − 1, and 11

∣∣15720 − 1, and the integers 3, 5, and 11 are pairwise

relatively prime, then 165∣∣15720 − 1 also, that is,

15720 ≡ 1 (mod 165).

Therefore, 240 ≡ 1 (mod 165) and 15740 ≡ 1 (mod 165), so that 31440 ≡ 1 (mod 165), and since162 = 4 · 40 + 2, then

314162 ≡(31440

)4· 3142 ≡ 3142 ≡ 91 (mod 165).

Page 5: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 11.

Prove that an − bn is divisible by the prime n + 1 if neither a nor b is.

Solution: Note that if p is a prime and (a, p) = 1 and (b, p) = 1, then from Fermat’s theorem we have

ap−1 ≡ 1 (mod p) and bp−1 ≡ 1 (mod p),

so thatap−1 − bp−1 ≡ 0 (mod p).

Now, if n + 1 a prime and (a, n + 1) = (b, n + 1) = 1, then from the above we have

an − bn ≡ 0 (mod n + 1),

that is, n + 1∣∣an − bn.

Question 12.

Suppose that p is an odd prime.

(a) Show that1p−1 + 2p−1 + · · · + (p − 1)p−1 ≡ −1 (mod p).

(b) Show that1p + 2p + · · · + (p − 1)p ≡ 0 (mod p).

Solution:

(a) Since p is an odd prime and (k, p) = 1 for 1 ≤ k ≤ p − 1, then Fermat’s theorem implies that

kp−1 ≡ 1 (mod p)

for 1 ≤ k ≤ p − 1, and therefore

1p−1 + 2p−1 + · · · + (p − 1)p−1 ≡ 1 + 1 + · · · + 1︸ ︷︷ ︸

p−1 times

≡ p − 1 ≡ −1 (mod p).

(b) Again, from Fermat’s theorem we have

kp ≡ k (mod p)

for 1 ≤ k ≤ p − 1, and therefore

1p + 2p + · · · + (p − 1)p ≡ 1 + 2 + · · · + p − 1 ≡ p

(p − 1

2

)

≡ 0 (mod p)

sincep − 1

2∈ Z

+.

Question 13.

Show that σ(n) is odd if n is a power of 2.

Solution: If n = 2α, then

σ (2α) =∑

d | 2α

d = 1 + 2 + 22 + · · · + 2α =2α+1 − 1

2 − 1= 2α+1 − 1,

and σ (2α) = 2α+1 − 1 is odd for all integers α ≥ 0.

Page 6: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 14.

For which n is σ(n) odd?

Solution: We have seen that if n = 2α, then σ(n) is odd. Suppose now that p is an odd prime and that αis a positive integer, then

σ (pα) = 1 + p + p2 + · · · + pα =pα+1 − 1

p − 1,

and σ (pα) is odd if and only if the sum contains an odd number of terms, that is, if and only if α is an eveninteger.

Therefore, σ(n) is odd if and only if in the prime power decomposition of n, every odd prime occurs to aneven power, that is, if and only if n is perfect square or n is 2 times a perfect square.

Question 15.

Find a formula for σ2(n) =∑

d |n

d2.

Solution: If p is a prime and α is a positive integer, then

σ2 (pα) =∑

d | pα

d2 = 1 + p2 + p4 + p6 + · · · + p2α =

(p2

)α+1− 1

p2 − 1=

p2α+2 − 1

p2 − 1,

and if the prime power decomposition of n is given by

n =

r∏

k=1

pαk

k ,

where the pk’s are distinct primes, then

σ2(n) =

r∏

k=1

p2αk+2 − 1

p2k − 1

.

Question 16.

It was long thought that even perfect numbers ended alternately in 6 and 8. Show that this is not the caseby verifying that the perfect numbers corresponding to the primes

213 − 1 and 217 − 1

both end in 6.

Solution: Note that 24 ≡ 6 (mod 10) and 6k ≡ 6 (mod 10) for all k ≥ 1. Now, if k ≡ 1 (mod 4), thenk = 1 + 4m for some integer m ≥ 1, and

2k ≡ 21 · 24m ≡ 2 ·(24

)m≡ 2 · 6m ≡ 2 · 6 ≡ 2 (mod 10),

so that 2k − 1 ≡ 1 (mod 10) for all k ≥ 1, k ≡ 1 (mod 4).

Also, if k = 1 + 4m, then k − 1 = 4m and

2k−1 ≡(24

)m≡ 6m ≡ 6 (mod 10)

for all k ≥ 5, k ≡ 1 (mod 4), and therefore

2k−1(2k − 1

)≡ 6 · 1 ≡ 6 (mod 10)

for all k ≥ 5, k ≡ 1 (mod 4). The result now follows since both 13 and 17 are congruent to 1 modulo 4.

Page 7: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 17.

Show that all even perfect numbers end in 6 or 8.

Solution: We have seen that any even perfect number n has the form

n = 2k−1(2k − 1

)

where 2k − 1 is prime (and hence k is also prime).

If k ≡ 1 (mod 4), then we saw in the previous problem that the last digit of n is a 6.

Suppose now that k ≡ 3 (mod 4), then k = 3 + 4m for some integer m ≥ 0, so that

2k ≡ 23 ·(24

)m≡ 23 · 6m ≡ 8 · 6 ≡ 8 (mod 10)

and 2k − 1 ≡ 7 (mod 10).

Also,2k−1 ≡ 22

(24

)m≡ 4 · 6 ≡ 4 (mod 10),

so thatn = 2k−1

(2k − 1

)≡ 4 · 7 ≡ 8 (mod 10)

for all k ≡ 3 (mod 4).

Question 18.

If n is an even perfect number, with n > 6, show that the sum of its digits is congruent to 1 modulo 9.

Solution: Since 10k ≡ 1 (mod 9) for all k ≥ 0, then any positive integer n is congruent modulo 9 to thesum of it digits, so we only need to show that if

n = 2k−1(2k − 1

), k ≥ 3

is an even perfect number, then n is congruent to 1 modulo 9.

Let n = 2k−1(2k − 1

)be an even perfect number, n > 6, then 2k − 1 and k are both odd primes. Note that

22 ≡ 4 (mod 9), 23 ≡ 8 ≡ −1 (mod 9), 26 ≡ 1 (mod 9).

Also, since k is prime, then k ≡ ±1 (mod 6).

If k ≡ 1 (mod 6), then k = 1 + 6m for some m ≥ 1, so that

2k ≡ 2 ·(26

)m≡ 2 (mod 9),

and2k − 1 ≡ 2 − 1 ≡ 1 (mod 9).

Also,2k−1 ≡

(26

)m≡ 1 (mod 9),

so thatn = 2k−1

(2k − 1

)≡ 1 (mod 9)

if k ≡ 1 (mod 6).

Page 8: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

If k ≡ −1 (mod 6), then k = 5 + 6m for some m ≥ 0, so that

2k ≡ 25 ·(26

)m≡ 5 (mod 9),

and2k − 1 ≡ 5 − 1 ≡ 4 (mod 9).

Also,2k−1 ≡ 24

(26

)m≡ 7 (mod 9),

so thatn = 2k−1

(2k − 1

)≡ 4 · 7 ≡ 28 ≡ 1(mod 9)

if k ≡ −1 (mod 6).

Question 19.

Show that if n is odd, then φ(4n) = 2φ(n).

Solution: If n is odd, then (4, n) = 1, so that

φ(4n) = φ(4) · φ(n) = 2φ(n).

Question 20.

Perfect numbers satisfy σ(n) = 2n. Which n satisfy φ(n) = 2n ?

Solution: If n is a positive integer and φ(n) = 2n, then since

φ(n) ≤ n − 1,

this implies that 2n ≤ n − 1, that is, n ≤ −1, which is a contradiction. Therefore, there are no positiveintegers n for which φ(n) = 2n.

Question 21.

Note that

1 + 2 =3

2· φ(3)

1 + 3 =4

2· φ(4)

1 + 2 + 3 + 4 =5

2· φ(5)

1 + 5 =6

2· φ(6)

1 + 2 + 3 + 4 + 5 + 6 =7

2· φ(7)

1 + 3 + 5 + 7 =8

2· φ(8)

Guess a theorem!

Solution: The theorem was one that we proved in class, namely,

n∑

k=1(k,n)=1

k =n

2· φ(n).

Page 9: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 22.

Find all solutions of φ(n) = 4, and prove that there are no more.

Solution: If the prime power decomposition of the positive integer n is given by

n = 2α · pα1

1 · pα2

2 · · · pαk

k ,

where the pi’s are distinct odd primes, then

φ(n) = 2α−1 · pα1−11 · pα2−1

2 · · · pαk−1k (p1 − 1)(p2 − 1) · · · (pk − 1),

and it is clear that if φ(n) = 4 then n can have no more than 2 odd prime factors and these must occur tothe first power. It is also clear that the exponent of the power of 2 must be less than or equal to 3.

Thus, if φ(n) = 4, then n must have one of the forms

n = 2α for α ≤ 3,

n = 2α · p for α ≤ 2, p an odd prime

n = 2α · p · q for α ≤ 1, p, q odd primes

In the first case, if n = 2α, then φ(n) = 2α−1 = 4 if and only if α − 1 = 2, that is, α = 3, so n = 8 is onesolution to φ(n) = 4.

In the second case, if n = 2α · p, where p is an odd prime, then φ(n) = 2α−1(p− 1), and φ(n) = 4 if and onlyif either α − 1 = 1 and p − 1 = 2, or α − 1 = 0 and p − 1 = 4, or α = 0 and p − 1 = 4. Thus, n is a solutionto φ(n) = 4 if and only if n = 4 · 3 = 12 or n = 2 · 5 = 10, or n = 1 · 5 = 5.

In the third case, if n = 2α · p · q, where p and q are distinct odd primes, then φ(n) = 2α−1(p − 1)(q − 1),and since both p − 1 and q − 1 are even, then we must have α = 0. Also, since p and q are distinct oddprimes, then (p− 1)(q − 1) = 4 implies that one of p− 1 or q − 1 equals 1 and the other equals 4, which is acontradiction. Thus, in this case φ(n) 6= 4, and there are no solutions.

Therefore, the only solutions to φ(n) = 4 are 5, 8, 10, and 12.

Question 23.

Show that if (m, n) = 2, then φ(m · n) = 2 · φ(m) · φ(n).

Solution: Let m = 2r ·M and n = 2s ·N where M and N are odd and one of r or s is 1, then (M, N) = 1so that

φ(m · n) = 2r+s−1 · φ(M) · φ(N),

andφ(m) · φ(n) = 2r−1 · φ(M) · 2s−1 · φ(N) = 2r+s−2 · φ(M) · φ(N),

and therefore2 · φ(m) · φ(n) = 2r+s−1 · φ(M) · φ(N) = φ(m · n).

Page 10: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 24.

Show that if n − 1 and n + 1 are both primes, with n > 4, then φ(n) ≤n

3.

Solution: Since n > 4, then n − 1 > 3, and since one of the consecutive integers n − 1, n, and n + 1 isdivisible by 3 and n − 1 and n + 1 are primes greater than 3, then 3

∣∣n. Also, n must be even, since n − 1

and n + 1 are odd primes, so that 2∣∣n.

Since (2, 3) = 1, and n is a common multiple of 2 and 3, then 6 = 2 · 3 = [2, 3] also divides n, and we canwrite

n = 2a · 3b · N

where a ≥ 1 and b ≥ 1, and (2, N) = (3, N) = 1.

Therefore,

φ(n) = 2a · 3b−1 · φ(N) ≤ 2a · 3b−1 · N =n

3.

Question 25.

One of the primitive roots of 19 is 2. Find all of the others.

Solution: Since φ(19) = 18, and φ(18) = 6, then there are 6 incongruent primitive roots of 19, and theyare

2u, 1 ≤ u ≤ 18, with (u, 18) = 1,

that is, the incongruent primitive roots of 19 are 2, 25, 27, 211, 213, 217.

Question 26.

Suppose that p is a prime and a has order 4 modulo p. What is the least positive residue of (a + 1)4 modulop ?

Solution: Since a4 ≡ 1 (mod p), then p ≥ 5, and since

p∣∣a4 − 1 = (a2 − 1)(a2 + 1),

and p is prime with a2 6≡ 1 (mod p), then p∣∣a2 + 1, that is, a2 ≡ −1 (mod p).

Therefore,

(a + 1)4 ≡ a4 + 4a3 + 6a2 + 4a + 1 ≡ 1 − 4a − 6 + 4a + 1 ≡ 2 − 6 ≡ −4 ≡ p − 4 (mod p),

and (a + 1)4 ≡ (p − 4) (mod p), so the least positive residue of (a + 1)4 modulo p is p − 4.

Question 27.

If r is a primitive root of the prime p, show that two consecutive powers of r have consecutive least positiveresidues modulo p, that is, show that there exists an integer k ≥ 1 such that

rk+1 ≡ rk + 1 (mod p).

Solution: The set{1, r, r2, . . . , rp−1}

forms reduced residue system modulo p. Therefore, since the φ(p) = p − 1 integers

{r2 − r, r3 − r2, r4 − r3, . . . , rp − rp−1}

are all incongruent modulo p, they also form a reduced residue system modulo p, and there must be aninteger k, with 1 ≤ k ≤ p − 1, such that

rk+1 − rk ≡ 1 (mod p).

Page 11: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 28.

Show that if p is an odd prime and a is a quadratic residue modulo p, and a · b ≡ 1 (mod p), then b is alsoa quadratic residue modulo p.

Solution: There exists an integer x such that x2 ≡ a (mod p), so that

(x · b)2 ≡ x2 · b2 ≡ a · b2 ≡ (a · b) · b ≡ 1 · b ≡ b (mod p),

and b is also a quadratic residue modulo p.

Question 29.

Suppose that p = q + 4a where p and q are odd primes. Show that

(a

p

)

=

(a

q

)

.

Solution:

Suppose first that a = 2, then p ≡ q (mod 8), so that

(2

p

)

= (−1)p2−1

8 = (−1)q2−1

8 =

(2

q

)

.

Now suppose that a is an odd prime, then p = q + 4a implies that p ≡ q (mod a), so that

(p

a

)

=(q

a

)

,

and since p ≡ q (mod 4), thenp − 1

2≡

q − 1

2(mod 2), so that

(a

p

)

=(p

a

)

· (−1)p−12 ·

a−12 =

(q

a

)

· (−1)q−12 ·

a−12 =

(a

q

)

.

In the general case, if the prime power decomposition of a is given by

a = pα0

0 · pα1

1 · pα2

2 · · · pαk

k ,

where p0 = 2 and for 1 ≤ i ≤ k, the pi’s are distinct odd primes, then

(pαi

i

p

)

=

(pi

p

)

αi odd

1 αi even

and since the Legendre symbol is multiplicative, we have

(a

p

)

=

k∏

i=0αi odd

(pi

p

)

=

k∏

i=0αi odd

(pi

q

)

=

(a

q

)

.

Page 12: MATH 324 Elementary Number Theory Solutions to …isaac/math324/s05/prac_solns.pdfMATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August

Question 30.

Show that 3 is a quadratic nonresidue of all primes of the form 4n + 1.

Solution: If p = 4n + 1 is prime, where n ≥ 1, then p ≡ 1 (mod 4), and from the law of quadraticreciprocity, we have

(3

p

)

=(p

3

)

,

and since p ≡ 4n + 1 ≡ 2 (mod 3), then

(3

p

)

=(p

3

)

=

(2

3

)

= (−1)32−1

8 = −1.

Therefore, 3 is a quadratic nonresidue of any prime of the form 4n + 1.

Question 31.

(a) Show that if p ≡ 7 (mod 8) is prime, then p∣∣ 2

p−1

2 − 1.

(b) Find a factor of 283 − 1.

Solution:

(a) If p = 7 + 8k is a prime, thenp2 − 1

8= 6 + 14k + 8k2,

and (2

p

)

= (−1)p2−1

8 = 1,

and 2 is a quadratic residue modulo p. From Euler’s criteria, since (p, 2) = 1, we have

2p−1

2 ≡

(2

p

)

(mod p),

that is,

2p−1

2 ≡ 1 (mod p),

so that p∣∣ 2

p−1

2 − 1.

(b) If we letp − 1

2= 83,

then p = 1 + 166 = 167 is prime, and p = 7 + 8 · 20. From part (a), we know that

p∣∣ 2

p−1

2 − 1,

so that p = 167 is a factor of 283 − 1.