Number Theory
Number Theory
I STUDENTS
NUMBER THEORY
Lecture Notes
Compiled by:
First Edition
Benjier H. Arriola 2
INSTRUCTOR:BENJIER H. ARRIOLA
Course Description:
Course Outline:
I. DIVISIBILITY
1. Properties of Divisibility
2. Division Algorithm
3. Greatest Common Divisor
4. Integral Linear Combination
5. Least Common Multiple
IV. CONGRUENCES
3 I
1. Linear Congruence
2. Linear Diophantine Equation
3. System of Linear Congruences
a. Pour wise Relatively Prime
b. Chinese Remainder Theorem
4. Format’s Remainder Theorem
5. Euler’s Theorem
6. Wilson’s Theorem
V. MULTIPLICATIVE FUNCTIONS
1. Three Special Functions
2. Perfect Numbers
a. Euler Theorem
3. Mobins Inversion
X. QUADRATIC CONGRUENCES
1. Euler’s Criterion
2. The Legendre Symbol
3. The Quadratic Reciprocity Law
4. Applications of the Quadratic Reciprocity Law
5. Quadratic Congruences
6. Linear Congruences of Two Unknows
XI. APPLICATION
1. Bar Codes
2. Coding
3. Perpetual Calendars
4. Round-Robin tournaments
Reference:
Benjier H. Arriola 4
The best way to use any particular textbook varies from teacher
to teacher and from student to student. Therefore, any printed
suggestions such as these cannot be expected to fit all situations.
Nevertheless, this handout was to lessen the burden of the students
especially in our institution where textbook is limited to a few copies
and sometimes nothing can be found in our mini library.
course proceeds, show students how to locate topics and terms in the
contents. The Glossary and the Index.
Chapter I
1. INTEGERS
2. WELL-ORDERING
EXAMPLE 1
Classify the following set according to type (a), type (b), or type
1. {aℤ│𝑎2 is positive}
(c):
Benjier H. Arriola 10
2. {aℤ│𝑎2 is negative}
3. {aℤ│2𝑎 +1 > 6}
4. {aℤ│3𝑎 = 4}
EXAMPLE 2
Consider the following set of rational numbers:
S = {2 + 10-m│m = 1, 2, 3,…} = {2.1,2.01,2.001,…}
Certainly, S contains rational numbers, so it is not of type (a).
Does S contain a smallest rational number? The answer is no
because 2 + 10-(m + 1) < 2 + 10-m for any positive integer m. Thus
S is not of type (b). Finally, does S contain arbitrarily small
rational numbers? Again the answer is no, because every
number in S is greater than 2. Thus S is not of type (c). The
reason for this fact, of course, is that S is not a set consisting
only of integers.
EXAMPLE 3
1(1+1)
Then d > 1 since 1= 2 . Now consider d - 1. Then 1 ≤
d – 1 < d and since d is the least integer in D, d - 1∉ D. 1 + 2
(d−1 )(d−1+1 )
+…+ (d - 1) = 2 . Adding d to both sides of this
equality results in the equality 1 + 2 +…+ (d - 1) + d =
d (d +1)
2 which contradicts the fact that d∈ D.
■
Comparing the two presentations of this proof, you can see that
the second one leaves out laborious details of standard techniques.
3. INDUCTION
k (k +1 )
1 + 2 + . . . + k + (k + 1) = 2 + (k + 1)
by inductive hypothesis
k (k +1 )+2(k +1 )
= 2
( k +1 )( k +2 )
= 2
so the formula is true for n = k + 1 if it is true for n = k.
Hence
n(n+1 )
1+2+...+n= 2
THEOREM 1.2
For all n∈ N
2 + 22 + 23 + . . . + 2n = 2n+1- 2.
THEOREM 1.3
Let h >-1 be a fixed real number, then (1 + h)n ≥1 + nh for all n
∈ N.
≥ 1 + h + kh + 0
= 1 + (k + 1)h,
so the inequality is true for n = k + 1 if it is true for n = k.
By the principle of mathematical induction,
(1 + h)n ≥ 1 + nh for all n∈ N .
THEOREM 1.4
Let qn be a statement involving a natural number n. Assume that
i. q1 is true,
ii. for all k∈ N , if q1, q2, q3, . . . , qk are true, then qk+1 is
true.
Then qn is true for all n∈ N .
EXERCISES 1.1
n(3 n−1 )
2. 1 + 4 + 7 + . . . + (3n-2) = 2 .
n( n+1 )( 2 n+1)
12 +2 2 +.. .+n2 =
3. 6 .
3 3 3 2
4. 1 +2 +. ..+n =(1+2+3+. ..+n )
n 2 ( n+1 )2
13 + 23 +. ..+n 3=
4. 4 .
n(n+1 )(2 n+1)(3 n 2+3 n−1 )
14 +24 +. ..+ n4 =
5. 30 .
6. xn-yn=(x - y)(xn-1+xn-2y+…+xyn-2+yn-1).
1 1 1 1 n
+ + + .. .+ =
7. 1⋅2 2⋅3 3⋅4 n(n+1) n+1
8. Prove that 2n ≥ n2 for all n ≥ 5, n∈ N.
9. Prove that n3 + 3n2 + 1 ≥ 0 for all n ≥ -2, n∈ N.
10. Prove that, for any n∈ N and for any positive real numbers a1,
a2, …, an,
n a1 + a2 +⋯+ a2n
2
√ 1 2 2n
a a ⋯a ¿
2n .
11. Prove that, for any n N and for any positive real numbers a1,
∈
a2, …, an,
a1 + a2 +⋯+ an
√n a1 a2 ⋯an ≤ n
Benjier H. Arriola 16
(Hint: if m ≠ 2n, then choose n so that 2n-1 < m < 2n. Put b
= (a1 + a2 + …+ am)/m. Then use Ex. 10 with a1, a2, …, am,
a a
am+1, …, 2n , where am+1 =…= 2n = b.)
12. Suppose that F1 = 1, F2 = 1, F3 = 2, F4 = 3, F5 = 5, and in
general Fn = Fn-1 + Fn-2 for n ≥ 3. (Fn is called the nth
Fibonacci number.) Prove that
F 1 +F 2 +F 3 +⋯+F n=F n−2−1 .
17 I
Chapter II
DIVISIBILITY
Example 1.1
According to this definition, 3 does not divide 4, or 3 ┼ 4
since there is no integer which when multiplied by 3 gives
4. On the other hand, 5 does divide 35, or 5│35 since 35 =
5(7) and 7є Z.
d) a│b and b│c implies b=ae and c=bf for some e,f ∈ Z
implies c=(ae)f=a(ef). Thus a│c.
e) The proof of this theorem is in two parts. First we must
show that if a│b, then ac│bc and second we need to
show that if ac│bc, then a│b. To show the first part we
use definition 2.1, that is, a│b implies b=ax for some x
∈ Z implies bc=(ac)x. Therefore, ac│bc. To show the
second part, by definition 2.1, ac│bc implies bc=(ac)y
for some y∈ Z implies b=ay. Thus a│b. Hence a│b iff
ac│bc.
f) a│b and c│d implies b=ax and d=cy for some x,y∈ Z
implies bd=(ax)(cy)=(ac)(xy). Therefore ac│bd.
g) a│b and a│c implies b=ax and c=ay for some x,y ∈ Z
implies b+c=ax+ay=a(x+y). Therefore a│b+c.
h) a│b implies b=ax for some c ∈ Z implies bc=(ax)c=a(xc).
Thus a│bc.
i) a│b and a│c implies a│bx and a│cy by theorem 2.1 (h).
Therefore by theorem 2.1 (g) a│(bx+cy).
j) ab│c implies c=(ab)x for some x∈ Z implies c=a(bx).
Therefore a│b.
Example 1.2
Let a = 317 and b = 5, then dividing 317 by 5 gives 63 and
a remainder of 2;
63
5
|317
30
17
15
2 remainder
Example 1.3
19 I
Example 1.4
You can verify easily that the following are true:
(6,4) = 2, (12,18) = 6, (-12, 18) = 6, (-5, 0 ) = 5
Example 1.5
The positive divisors of 12 are 1,2,3,4,6 and 12. The
positive divisors of -8 are 1,2,4 and 8. Thus the positive
common divisors of 12 and -8 are 1,2, and 4; hence (12,-8)
= -4.
Example 1.6
1. (4,8) = 4 since 4│8
2. 2│4 and 2│8 so (4/2, 8/2) = 4/2 = (2,4) = 2
3. (6,14) = (2•3, 2•7) = (3,7)•2 = 1•2 = 2
THEOREM 1.4
Let a, b ∈ Z. If a = bq + r, then (a, b) = (b, r)
Example 1.7
(8216, 1508) = (1508, 676) since 8216 = 5(1508) + 676
(1508, 676) = (676, 156) since 1508 = 2 (676) + 156
Benjier H. Arriola 20
THEOREM 1.5
Let a, b ∈ Z with b > 0. Then (a,b) is the last non zero
remainder rk in the series of equations obtained from the
Division Algorithm:
a = bq1 + r1, 0 < r1< b
b = r1·q2 + r2 , 0 < r2 < r1
r1 = r2q3 + r3, 0 < r3 < r2
r2 = r3q4 + r4, 0 < r4 <r3
rk-2 = rk-1·qk + rk, 0 < rk <rk-1
rk-1 = rk·qk+1 + 0
Example 1.8
Let us use the Division Algorithm together with
Theorem 1.4 to calculate (8216, 1508), First,
8216 = 5 (1508) + 676
Hence (8216, 1508) = (1508, 676). Next,
1508 = 2(676) + 156
So (1508, 676) = (676, 156), Continuing we obtain
676 = 4(156) + 52 and (676, 156) = (156, 52)
156 = 3 (52) + 0
Therefore (8216, 1508 = 52
Example 1.10
To find the GCD of 27 and 87, we have
87 = 3(27) + 6
27 = 4(6) + 3
6 = 2(3) + 0
Thus (27,87) = 3
Example 1.11
From example 1.9, we would like to solve 8216x + 1508y
= 52.
We will rewrite the steps so that you can see how
this straight forward process
works.
8216 = 5(1508) + 676
1508 = 2 (676) + 156
676 = 4 (156) + 52
Example 1.12
The set of common multiple of 4 is {4,8,12,16,20,24,
…} and the set of common multiple of 5 is
{5,10,15,20, …}. Thus, the common multiple of both
and 5 are 20,40,60, … Since 60<40<20 therefore
{4,5} = 20.
Example 1.13
[8,12] = 24 , [9, 15] = 45
Example 1.14
a. [2,4] = 2.4/(2.4) = 8/2 = 4
b. [3,20] = 3.20 = 60 since (3,20) = 1
c. [4,20] = 20 since 4/20
d. [12,16] = [3.4,4.4] = [3,4] 4 = 2.4 = 48
Benjier H. Arriola 22
EXERCISES 1.1
EXERCISES 1.2
1. True or False: If b│c and a│c, then a│b (If true, prove it; if
false provide a numerical example).
2. Prove that [ab,ad] ≤ a·[b,d]
3. Show that (5x + 6, 5x + 8) = 1 for all integers x.
4. Show that for all k∈ Z, (k, k+1)
5. Suppose that a│(k3-1). Show that a│(k2 – 1). Does a│(k3 – 1)?
Is there a general result?
6. Show that if a│2x – 3y and a│4x – 5y, then a│y.
7. Assume that d│n. Show that dc│n iff c│(n/d)
8. Show that if a│x, b│x and (a,b) = 1, then ab│x. (Hint: 1=au
+ bv, so multiply by x)
23 I
Chapter II
Benjier H. Arriola 24
Example 3.1
In the decimal system, 209 stand for 2·102 + 0·101 +
9·100
Similarly, for 4129 stand for 4·103 + 1·102 + 2·101 +
9·100
Example 3.2
In binary notation, we write 23 as 10111, which
stands for 1·24 + 0·22 + 1·22 + 1·21 + 1·20, and 36
ahs the form 100100 which stands for 1·25 + 0·24 +
0·23 + 1·22 + 0·21 + 0·20.
Example 3.3
Let A=10; B=11; C=12; D=13; E=14 and F=15.
using these symbols, we write three hundred to the base
sixteen as 12c that is 1.16 2+ 2.16 = 12.160.
THEOREM 3.2
An integer n is even iff its last decimal digit is even.
THEOREM 3.3
Let n
Example 3.4
We ant to know if 3/78162
7+8+1+6+2 = 24 since 3/24
Therefore 3/78162
THEOREM 3.4
Let n = a
Is the integer consisting of the last m decimal digits of n, then 2
m/n
Example 3.5
25 I
THEOREM 3.5
Example 3.6
97,450
5/97450 since 5/0
5/97450 since 5/50
5/97450 since 5/450
Also 5/97450 since 5/450
THEOREM 3.6
Let n =
Example 3.7
62541
6+2+5+4+1 = 18 since 9/18
Therefore 9/62541
THEOREM 3.7
Let n =
Example 3.8
90816
(9+8+6) – (0+1) = 23 – 1 = 22
Therefore 11/90816
EXERCISES 3.1
was a whole number of pounds and that the four pieces could
be used to weigh every integral weight between + and 40
pounds. What were the weights of the pieces?
6. Using Exercise 3.2.1, determine the least number of weights
required to weigh any integral number of pounds up to 80
pounds if one is allowed to put weighs in both pans of
balance.
EXERCISE 3.2
I. Primes
Example 2.1
Clearly 2,3,5,7,11 are all prime, while 15 is not a
prime since it is divisible by 3 as well as 1 and 15.
Example 2.2
15 is composite since 15 is not a prime.
Example 2.3
The positive divisors of 7 are 1 and 7. The positive
divisors of 27 are 1,3,9 and 27. Since 1 is the only positive
common divisor of 7 and 27, then these two integers are
relatively prime.
THEOREM 2.1
Every integer greater than 1 can be expressed as a product of
prime.
The Phrase “ a product of prime’ allows the possibility of
only one term accruing in a product; thus a prime
number is already “ a product of prime”
Example 2.4
20 = 4 x 5 = 2 x 2 x 5
THEOREM 2.2
There exist infinitely many prime.
Example 2.5
A prime factorization of 20 is 2.2.5
THEROEM 2.3 (Fundamental Theorem of Arithmetic)
For each integer n >1, there is exactly one prime factorization
for n.
THEOREM 2.4
Let p be a prime and let n be any integer
(n,p) = { P if p/n
{1 if p and n
Example 2.6
(5, 25) = 5 since 5/25
(7, 26) = 1 since 7 x 26
THEOREM 2.5
Let p be a prime, If P/ab, then either p/a or p/b
Example 2.7
2/8.9 so 2/8 but 2 x 9
THEOREM 2.6
Benjier H. Arriola 28
Example 2.8
7/(33.56.65) so 7/56
13/(33.56.65) s0 13/65
THEOREM 2.7
Let n ≥ 2 be an integer with Canomical representation n =
_____________. An integer m ≥ 1 is a positive divisor of n iff m =
Example 2.9
If n = 3 5 13 and m =15 then m/n and m = 3.5 = 3 5
13
Example 2.10
29 I
Example 2.11
The following are steps of Sieve of Eratosthenes:
1. Write in order the list of consecutive odd integers
beginning with 3.
2. Remove every p+h number following the p, wherein p
is the smallest unused remaining prime number in the
list.
3. Now if at any stage of this algorithm one has just
removed every qth number following the smallest
surviving number of which is necessary prime, then all
surviving numbers in the list as far as but not including
q2 are prime numbers.
3 5 7 9 11 13 15 17 19 21 23
25
27 29 31 33 35 37 39 41 43 45 47
49
51 53 55 57 59 61 63 65 67 69 71
73
75 77 79 81 83 85 87 89 91 93 95
97
99
THEOREM 2.9
Let n be a consecutive natural numbers beginning with 2. If d
does not exceed n +1, K=d is divisible by d, where k is the least
common multiple of n; however, more than the n consecutive numbers
so obtained may be composite.
Example 2.12
To obtain six consecutive composite numbers, note
that the LCM of the six natural numbers 2,3,4,5,6,7, is 420.
Hence 420+2 is divisible by 2, 423 is divisible by 3, 424 is
divisible by 4,425 is divisible by 5, 426 is divisible by 6,
427 is divisible by 7.
Benjier H. Arriola 30
3. FORMAT FACTORIZATION
This method for finding all ways of factoring an odd integer
into two unequal factors was invented by Pierre de Fermat, a brilliant
17th century mathematician.
1. If n > 0 is an odd integer, make a table consisting of (n-1)/2
rows, obtained by successively adding consecutive odd
integers to n. Note which rows of the table contain perfect
squares.
2. If the 5th row contains t2, then (t+s)(t-s) = n and all factoring
of n into two distinct factors are produced in this manner.
Example 2.13
Let n = 21
Row Number
1 21 + 1 = 22
2 22 + 3 = 25 = 52
3 25 + 5 = 30
4 30 + 7 = 37
5 37 + 9 = 46
6 46 + 11 = 57
7 57 + 13 = 70
8 70 15 = 85
9 85 + 17 = 102
10 102 + 19 = 121 =
112
Note 10 = (21-1)/2
4. FACTOR TABLES
The Sieve of Eratosthenes provides a factor table, as well
as a list of prime numbers. If one underlines every third number
following 3, if one over lines every fifth number following 5, if one
prefixes the * to every seventh number following 7, if one suffixes
(places after) the * after every eleventh number following 11, if one
prefixes the ‘ before every thirteenth number following 13, one obtains
31 I
Notations:
a = divisible by 3 a* = divisible by 11
a = divisible by 5 a = divisible by 13
*a = divisible by 7 “a = divisible by 17
3 5 7 9 11 13 15 17 19
21 23 25 27 29 31 33 35 37
39 41 43 45 47 49 51 53 55
57 59 61 63 65 67 69 71 73
75 77 79 81 83 85 87 89 91
93 95 97 99 101 103 105 107 109
111 113 115 117 119 121 123 125 127
129 131 133 135 137 139 141 143 145
147 149 151 153 155 157 159 161 163
165 167 169 171 173 175 177 179 181
183 185 187 189 191 193 195 197 199
201 203 205 207 209 211 213 215 217
219 221 223 225 227 229 231 233 235
237 239 241 243 245 247 249 251 253
255 257 259 261 263 265 267 269 171
273 275 277 279 281 283 285 287 289
291 293 195 297 299 301 303 305 307
309 311 313 315 317 319 321 323 325
327 329 331 333 335 337 339 341 343
345 347 349 351 353 355 357 359 361 = 192
Benjier H. Arriola 32
Example 2.14
Let A = 11, n = 11-2 = 9
6. PERFECT NUMBERS
Example 2.15
Let n=3, so 23-1=7 is a prime
Therefore (23-1) x 22 =7x4=28 is a perfect number
To check 28, we have to find all divisors of 28
We know that 1,2,4,7,14 are divisors of 28, then
1+2+4+7+14=28
1. Two consecutive odd natural numbers that are prime numbers are
called twin primes, such as (11,13), (17,19),(29,31),(41,43), etc…
Do such twin primes continue to occur without end in the list of
prime numbers? The answer is unknown (The twin primes)
2. Many prime numbers occur that are equal to the 1 plus a square
number, such as 22 + 1 or 5; 62 + 1 or 37; 162 + 1 or 257, etc… Do
33 I
EXERCISE 2.1
14. Determine all integers n such that n, n+2 and n+4 are
composite.
EXERCISE 2.2
11. Prove that the Sieve of Eratosthenes finds all primes (and
only primes) between 1 and the given integer k.
12. Let a and b be integers, and let sa + tb = 1 for s,t, in
Prove that a and b are relatively prime.
13. Prove that if (r,m) = 1 = (r’,m), then (rr’,m) = 1
14. If Fn denotes the nth term of the Fibonacci Sequence
0,1,2,3,5,8, … prove that (Fn-1, Fn) = 1 v n ≥ 1.
IV. CONGRUENCES
DEFINITION 4.1
Example 4.1
We see that 8≡2 mod 2 since 218-2 but 8≠3
mod 2 since 2X8–3. Similarly, 17≡12 mod 5 since
5/17-2 and 100≡-40 mod 20 since 20/100-(40).
Example 4.2
Let m = 6 and consider the expression 3-19+8-11-
14= N. Let us find a number r between 0 and 5 such that N
≡ r mod 6.
THEOREM 4.2
Let m>0 and suppose that ab ≡ ac mod m. If (a,m) = 1,
then b ≡ c mod m.
Example 4.3
50 ≡ 5 mod 3 → 10∙5 ≡ 1∙5 mod 3
Since (5,3) = 1 so 10 ≡ 1 mod 3.
THEOREM 4.3
Let a, m Є ≡ with m>0. Then there is an integer c such that ac ≡
1 mod m iff (a,m) =1.
Example 4.4
Looking again at a = 5, m = 26, we had c =
21.Since 5∙21 ≡ 1 mod 26. However, 21 is not a
possibility. For instance, 5∙(-5) ≡ 1 mod 26 and 5∙73
≡ 1 mod 26. Notice, though, that -5 ≡ 21 mod 26 and
37 I
Example 4.5
35 = 4(8) + 3, so 3 is the least positive residue
of 35 mod 8 or 35 = 3 mod 8.
1. LINEAR CONGRUENCES
Example 4.6
Solve the Linear Congruence 3x = 1 mod 5
Let x = 0,1,2,3,4
3(0) ≠ 1 mod 5
3(1) ≠ 1 mod 5
3(2) ≠ 1 mod 5
3(3) ≠ 1 mod 5
3(4) ≠ 1 mod 5
So the solutions are x = 5k + 2 where k ЄZ
THEOREM 4.4
The congruence ax=b mod m has at least one solution iff (a,m)/b
Example 4.7
9x = 3 mod 12 has solutions
Since (9,12) = 3 and3/3
THEOREM 4.5
Let d = (a,m), If d/b then the congruence ax=b mod m has
exactly d solutions mod m. If d+b, then the congruence has no
solution.
Example 4.8
8x=12 mod 20 has 4 solutions since (8,20) =4
and 4/12 but 3x =2 mod 6 has no solution since
(3,6)=3 and 3+2.
Benjier H. Arriola 38
Example 4.9
Solve the congruence 7x=2 mod 37
Solving the GCD we have (7,37) =1
So there is exactly one solution.
1. Use Euclidian Algorithm to find he GCD of 7
37 = 5(7) + 2
7 = 3(2) + 1
2. Find u since that au+mv=d=1
1 = 7-3(2)
1 = 7-3[37-5(7)]
1 = 7 -3(37) + 15 (7)
1 = 16(7) – 3 (37)
3. Therefore the solution is x=2(16) mod 37 which is
equivalent to x =32 mod 37.
Example 4.10
Solve the congruence 8x = 6 mod 10
1. (8,10) = 2 and 2/6, so there are 2 solutions
2. Reduce the given congruence
8x = 6 mod 10 = 4x = 3 mod 5
2 2
3. Find the unique solution of the reduced
congruence. Using the procedure in example 4.9,
The unique solution is x = 2 mod 5
4. Therefore the solutions are
X1 = 2 +0 (5) mod 10 = x1 = 2 mod 10
X2 = 2 +1(5) mod 10 = x2 = 7 mod 10
THEOREM 4.6
Let a, m ЄZ with m > 0. Then there exist a positive integer d
such that ad = 1 mod m if and only if (a,m) = 1.
Example 4.11
Since (3,4) = 1, so
4=1 mod 3 = 44 = 1 mod 3
= 48 = 1 mod 3
= 49 = 1 mod 3
THEOREM 4.7
Let p be a prime and let n be a positive integer. If m ≥ 0 and if Ʃ
= a1+a2+a3+…+a5 for which a1, a2, a3, …a5 are the digits of m in base p,
then nm= nƩ mod p.
Example 4.12
39 I
THEOREM 4.8
Example 4.13
Solve the Diophantine equation
21x + 12y = 36
We first calculate (21,12) = 3, then click that
36 = 3(12). Thus 3/36; hence solutions exist. Next we
express 3 as a combination of 21 and 12:
3 = (21) (-1) + 12(2)
Multiplying by 12 gives
(21)(-12) + 12(24)= 36
THEOREM 4.9
Example 4.14
Solve the Diophantine Equation
Benjier H. Arriola 40
15x + 21 y = 18
(15, 21) = 3, 3/18
3(15) - 2 (21) =3
(15) (18) + (21) (-12) = 18
Thus x0 = 18, y0 = -12
Hence, all solutions are given by
X= 18 + 7t, y= -12 + 5t, where t €Z
THEOREM 4.10
Example 4.15
Solve the Diophantine equation
6x + 11y = 41
6x = 41 mod 11 → 6x = 8 mod 11→ 3x = 4
mod 11→x=5 mod 11, so x=5
Therefore, x = 5 + 11t
y0= 41-6(5) = 11 = 1, so y= 1-6t.
11 11
Hence, all solutions are given by
X = 5 + 11t, y = 1-6t, t € Z
THEOREM 4.11
Consider the system of congruence
a1x = c1 mod m1
a2x = c2 mod m2
a k x = ck mod m k
and let d i = (a i, mi) for I =1,2,. . .,k. if for some j e € , 1 ≤
j ≤ k, d j + c j,
then no simultaneous solutions exist.
Example 4.16
The congruence
G x ≡ 4 mod 8
G x ≡ 3 mod 12
41 I
THEOREM 4.12
Example 4.17
Consider the two congruence
X ≡ 7 mod 11
X ≡ 10 mod 18
Example 4.18
11, 18 and 7 pair wise relatively prime, but
15, 7, and 18 are not since
(15, 18) =3≠1.
Example 4.19
All prime numbers are pair wise relatively
prime.
THEOREM 4.14
43 I
Example 4.20
Solve the system of linear congruence
x≡ 3 mod 5, x≡ 2 mod 6 and x≡ 4 mod 7.
Given: m 1=m 2=6,m k= 7
(5, 6, 7) =1
So M=5x6x7=210 and n k =m/m k.
n1 = 210/5 = 42
n2 =210/6 = 35
n3 =210/7 = 30
Now n 1x1 ≡ 1 mod 5 = 42x1 ≡ 1 mod 5 = 2x1,≡ 1 mod 5 =
x1 ≡ 3 mod 5 so x1 = 3.
N 2x2 ≡ 1 mod 6 = 35x 2 ≡ 1 mod 6 = 5x 2 ≡ 1 mod 6 = x2 ≡5
mod 6; so x2 =5
N3x3 ≡1 mod7=30x3≡1 mod 7= 2x3≡ 1 mod 7= x3≡ 4 ≡ 7,
so x3=4.
Thus x ≡ (n1x1a1+n2x2a2+n3x3a3) mod M
N1x1a1 + n2x2a2 +n3x3a3 = 42.3.3+35.5.2+ 30.4.4 =1208
Therefore x ≡ 1208 mod 210= x ≡158 mod 210
Hence, all solutions are given by x= 210t +158, t €
Z.
DEFINITION 4.5
Let m>o and let {r1, r2,…,r k} and {s1,s2,…,s k}be two set of
integers each containing the same (finite) number of distinct
elements. We say that {r1r2,...r k } ≡ {s1s2,…s k } mod m, if there is
a rearrangement of r1, r2,…,r k call it t1,t2…,t k, such that t1 ≡ s,
mod m,…t k ≡ s k mod m.
Example 4.15
With m= 6 we have {3,1} ≡ {7,27}mod 6, since
rearranging 3,1as 1,3, we get 1 ≡ 7 mod 6 and 3
≡27mod 6. similarly,{1,2,11,-2} ≡{5,8,-14,1} mod 6
since rearranging 1,2,11,-2 as 11, 2,-2,1 we get 11 ≡
Benjier H. Arriola 44
Example 4.22
{3,1} ≡ {7,27} mod 6 from example 4.21.now
3.1 ≡ 7.27 mod 6.
Example 4.23
3 ≡ mod 17, since (3, 17) =1.
16
Example 4.24
In example 4.12 we are ask to find a remainder
after dividing 312345 by 7.
since (3, 7 )= 1,so applying Fermat’s little
theorem 3 ≡1 mod 7.
6
5. EULER’S THEOREM
THEOREM 4.17
45 I
THEOREM 4.18
If m>0 and if u ≡ v mod m, then (u, m) =1 if and only if
(v, m ) =1.
Example 4.25
20 ≡ 3 mod 17, so (20, 17) = 1 and (3, 17) =1.
DEFINITION 4.6
If m > 1, let 6 (m) denote the number of positive integers which
are less than m and relatively prime to m. that is, cp (m) is the
number of the elements in the set {c €Z 1≤m-1 and (c, m) =1}.
Example 4.26
If m=2, 6(m) = 1, since 1 is the only positive integer
less than 2 and (1, 2) = 1.
if m=6, then 6 (m) = 2.since 1 and 5 are relatively
prime to 6 while 2,3,4 are
not. If m= 12, then 6(12) =4.
Example 4.27
In example 4.26, 6(12) =4,+ a=13 by Euler’s theorem
13 ≡ 1 mod 12 since
4
6. WILSON’S THEOREM
Example 4.28
3 is a prime, since (3-1)! +1 ≡0 mod 3.
THEOREM 4.21
Let p be an odd prime. X 2 ≡ a2 mod p if x ≡ +
mod p.
Example 4.29
Benjier H. Arriola 46
THEOREM 4.22
If p is an odd prime, then the congruence x 2 ≡ -1 mod p has
the solutions x ≡ + (p- 1/2)! Mod p if p ≡ 1 mod 4 and has
no solution if p ≡ 3 mod 4.
Example 4.3
Let p = 13, (13-1/2)! = 6! = 720
Now 720 ≡ 5 mod 13, so the solutions are x ≡ +5
mod 13.on the other
Hand , x 2 ≡-1 mod 19 has no solution, since 19 ≡
3 mod 4.
THEOREM 4.23
If p is an odd prime, pla 2+ b2 and (a, b) = 1 then p ≡ 1 mod
4.
Example 4.31
Theorem 4.22 is a tool or a test if the congruence
x2 ≡ -1mod p has solution
or no solution. For example 13/20 2 + 92, since 202
+9 =48 =13.37, and (20,
2
EXERCISES 4.1
1. Determine whether or not the ff. congruence are
true:
a) 7 ≡ 3 mod 4 d) 325 ≡-8 mod 13
b) 325 ≡-1 mod 37 e) 7 ≡7 mod 4
c) 7 ≡-3 mod 4 f)-42 ≡-11 mod 16
2. Find all positive integers m for which the ff. are true.
a) 13 ≡ 5 mod m c)-7 ≡ 6 mod m
b) 10 ≡ 9mod m d) 100 ≡-5 mod
m
3. Find the least nonnegative residue modulo m of each
of the ff. congruence
a) -157 ≡ b mod 11 d) 2 6 ≡ b mod 7
b) 442 ≡ b mod 26 e)7 19 ≡b mod 31
c) 6! ≡ b mod 7
4. Prove the ff. divisibility using congruence
a) 11/2335 +1
b) 31/1510-1
47 I
x Mod 11.
12. Given that k = 16 mod 11, find a number x
0≤x≤10 such that k3 + 6k2-24
= x mod 11.
13. Determine which of the ff. statements are true.
a. {2, -3} ≡ {10, 5} mod 8
b) {17,8} ≡ {-3,6} mod 11
c) {6,13} ≡ {-18,42} mod 24
d) {4,6,12} ≡ {-3,14,10} mod 3
e) {19, -18,70,-8,22,32,-348} ≡ {0,1,2,3,4,5,6}
mod 7
14. Find a set {r 1r2,…,r7} such that for each i,0 ≤ ri≤ 9
and {r1r2,…,r7} ≡
{12,- 35,-9,46,-12,20,24} mod 10.
15. For p=7, verify Fermat’s little theorem for each
of the ff. values of a:0,
2,-3,-6,3,12,6.
16. Use Fermat’s little theorem to solve for in each of
the ff.
a) 2 11 ≡ x mod 3, 0 ≤ x ≤ 12
b) 2 11 ≡ x mod 7, 0 ≤ x ≤ 6
c) 3 44 ≡ x mod 7, 0 ≤ x ≤ 6
d) 11 70 ≡ x mod 13, -25 ≤ x ≤ -13
17. Evaluate: φ (15), φ (21), φ (24), φ (32).
18. Use Euler’s theorem to solve for x in each of the
ff.
a) 2 14 ≡ x mod 15, 0 ≤ x ≤ 14
b) 517 ≡ x mod 21, 21 ≤ x ≤ 41
c) (29) 25 ≡x mod 24,-23 ≤x ≤0
d) (-533) 18 ≡ mod 32, 160 ≤x ≤ 191
49 I
EXERCISES 4.2
1. Show that a ≡b mod 1 for any a and b.
2. Show that if a ≡ b mod m and n is a positive divisor
of m, then a ≡ b mod n.
3. Prove: if (a, 2)=1, then a2 ≡ 1 mod 4.
4. Let p be a prime number, show that if a, b €Z such
that a b ≡ c mod p or b≡ 0 mod p.
5. Let p be a prime number. Show that if x€ Z such
that x2≡ 1 mod p,or x≡-1 mod p.
6. Prove: if p is an odd prime, then either p ≡ 1 mod 4
or p ≡ 3 mod 4.
7. If a ≡ b mod m and d € Z such that a= Ad, b=Bb,
m=M d, then A≡B mod M.
8. Prove: If ac ≡ b c mod m and d= (c, m) then a ≡ b
mod (m/d).
9. Prove: If a ≡ b mod m, then (a, m) = (b, m).
10. Show that if a ≡b mod p for all primes p 1 then
a=b.
11. Let p>2 be a prime. Show that if (a, p) =1,
then either a (p-1)/2 ≡ 1 mod p or a (p-1)/2 ≡ -1 mod p.
12. Let p and q be distinct primes. Show that p q-1+
qp-1 ≡ 1 mod pq. (hint: Fermat ; note that (p, q)=1.
13. Prove: if m is not a prime and m>1, then
G(m)<m-1.
14. Let p be a prime; calculate G(p2).
15. (a) Show that if an integer x is the sum of two
squares, then x≠ 3 mod 4.
(b) Show that if x € Z is the sum of three squares,
then x≠7 mod 8.
16. (a) Show that the equation 3x+2=y 2 has no
integer solutions.
(b) Show that the equation 5x+3=y2 has no integer
solutions.
MULTIPLICATIVE FUNCTIONS
1. THREE SPECIAL FUNCTIONS
THEOREM 5.1
Let m and n be positive integers with (m, n) = 1. Then φ (m
n) = φ (m) φ (n).
Benjier H. Arriola 50
Example 5.1
φ (210)= φ (35) φ (6)
THEOREM 5.2
Let p be a prime and e€ Z with e≥1. Then G(p e)=pe-1(p-1).
Example 5.2
φ (9)= φ (32) = 3(2) = 6
φ (4) = φ (22) = 2(1) =2
Example 5.3
Suppose m is a prime, so G(m) =m-1.for instance
m=3, then φ (3) =2.
THEOREM 5.3
Let m € Z with m≥2.if the canonical representation of m is
m=p1e1,p2 e2…p k e k, then φ φ (m) =[p1e-1p-1)] [p2e-1(p2-1)]…[pkek-1
(pk-1)].
DEFINITION 5.1
a. a function f define on the positive integers and
taking values in Z is called
multiplicative.
b. an arithmetic function is called multiplicative if for any
positive integers m
and n with (m, n)=1, we have f(m n)= f(m)f(n).
Example 5.4
F(n) =an is arithmetic function but not
multiplicative since f(2) f(3)= 4..6=24,
while f (2.3)= f(6) = 12. g (n)=n/2 is not arithmetic
since g(3)=3/2 € Z.
Example 5.5
The function of G is arithmetic, and theorem 5.1
tells us that φ is
multiplicative.
DEFINITION 5.2
Or any n ≥ 1, let ( ﺡn) denote the number of positive
divisors of n and let ó (n)
denote the sum of the positive divisors of n.
Example 5.6
51 I
Examples 5.7
C (20) =6, Since 20= 2 2.5.
THEOREM 5.5
The C is multiplicative function.
THEOREM 5.6
Let m and n be positive integers w/ (m,)=1. then ó (m n)=
ó(m) ó(n).
Example 5.8
Ó(2.3) = 12, Since the positive divisor of 6 are 1,2,3
and 6 and the sum is12.
ó(3)=3, since the positive divisors of 3 are 1 and 3.
thus ó(6)= ó(2) ó(3)=12.
THEOREM 5.7
If m = p 1e1p2e2…pkek, then ó(m)=[ p1e1+1-1
Example 5.9
Let m= 30, so m= 30=2x3x5.thus
Ó (30) = (
(3/1)(8/2)(24/2) = 3x4x6
= 72
2. PERFECT NUMBERS
DEFINITION 5.3
An integer n ≥ 1 is said to be a perfect number if ó(n)
=2n.
EXAMPLE 5.10
28 is a perfact number from example 2.15 6 is a
perfect number since ó(6)
=12=2(6).
3. MOBIUS INVERSION
Suppose that f is an arithmetic function and at this
pointwe do not insist that it
be multiplicative. We construct another arithmetic
function in the ff. manner.
For n ≥1, let d 1d2,…dr be all of the positive divisorsof
n. then defined f(n) to be
f(d)+f(d 2)+f(dr). In order to keep the notation short,
we use sigma notation to
abbreviate this sum. That is, Σdln f(d)=f(d)
+f(d2)+f(dr)= f(n).
As an example, we point out that the function ó can
be constructed in this
way. For if we start with the identity function f(n)=
n, and if the positive
divisors of n are d,d 2,…dr= ó(n).
THEOREM 5.9
Let f be a multiplicative function and for n ≥ 1 let f (n)
=Σdlnf(n). then f is
multiplicative.
DEFINITION 5.4
Let n>1 and let n=p 1e1p2e2…pses be the prime
decomposition of n. define M(n) i
EXAMPLE 5.11
M(6)= (-1)=1 since 6=2 1.31, M(12)=0 since 12 =22.3;
M(42)=(-1) =-1 since
3
THEOREM 5.10
The function M is a multiplicative function.
53 I
THEOREM 5.11
If n≥1, then Σ dlnM(d) f(n/d).
EXAMPLE 5.12
It is instructive to first see how 5.12 works with
n=12. we consider table 5-1,
whose rows and columns are both labeled by the
positive divisors of 12.
In table 5-1. the space in d row, c-column is left
empty if dcx12, and contains
M/(d)f( c ) if dc/12. for example, the space in the 3-
row , 3 column is blank
Because 3.3x12.
We will add together all the entries in this table, by
summing each row and
then totaling these row sums. For example ,if we
sum the 2-row we get M(2)
f(1)+M(2)f(2)+M(2)+f(6)= M(2[f(1)+f(2)+f(3)+f(6)].
Now 1,2,3, and 6 are
all the positive definition f(1)+f(2)+f(3)+f(6)= F(6).
Thus the sum of the 2
row is just M(2)F(6)=M(2)F(12/2).
1 2 3 4 6 12
1 M(1)f(1) M(1)f(2) M(1)f(3) M(1)f(4) M(1)f(6) M(1)f(12
)
2 M(2)f(1) M(2)f(2) M(2)f(3) M(2)f(6)
3 M(3)f(1) M(3)f(3) M(3)f(4)
4 M(4)f(1) M(4)f(4)
6 M(6)f(1) M(6)f(6)
12 M(12)f(1
)
THEOREM 5.13
Let f be an arithmetic function and let F be arithmetic
function defined by
F(n)= Σ dln f(d). if F is multiplicative, then f is
multiplicative.
THEOREM 5.14
For any integer n≥1, Σ dln M(d) ( ﺡn/d) =1.
EXERCISES 5.1
1. Calculate the ff.
a) φ (7) d) Ó (7) g) )7( ﺡ
b) φ (55) e) Ó(55) h) )55( ﺡ
c) φ (108) f) Ó(108) i) )108( ﺡ
EXERCISES 5.2
1. Give examples to show that φ(m n)≠ φ(m) φ(n),
Ó(mn)≠ Ó(m) Ó(n), and mn≠ (m) (n).
2. Call a function f, defined on positive integers, a
additive function if f(a+b)= f(a)+(b) for all a and b.
are any of φ, Ó, or additive?
3. Show that if m>2, then φ(m) is even.
4. show that if m=p1e1p2e2…pkek then φ(m)= m (1-1/p)
(1-1/pk)
5. show that if a/b, then φ(ab)=a φ(b). is the converse
true?
6. let f be the function defined by f(d)=d for all
positive integers d. show that f is a multiplicative
function and use thi fact to deduce theorem 5.6
from theorem 5.9.
7. deduce theorem 5.5 from theorem 5.9.
8. show that if p is a prime, then for any integer e≥1,
Σφ(d)=pe. dlpe
9. use exercise 5.2.8 and theorem 5.9 to show that Σ
d/lnφ for all positive intesers n.
10. let f and g be multiplicative function such that
f(pk)= g(pk) for all primes p and all integers k≥1.
11. let f and g be multiplicative functions and let fg
be the function defined by (fg)(n)=f(n)g(n) for all
positive integers n.
A show that fg is multiplicative.
b. can you express H(n)= Σd/ln(fg)(d) in terms
ofF(n)= ΣdLnf(d) and
G(n)= Σd/n g(d)?
12. an integer n is triangular if n=1+2+ ..+k for
some integer k≥1 (the 1st 4 triangular numbers are
1,3,6 and 10). Show that every even perfect
number is triangular.
13. prove that Σd/nM(d) Ó(n/d) =n.
14. prove that ifφ (m)/m-1, then there exists no
prime p such that p2/m.
15. Prove that if m is not a prime and φ(m)/m-1,
then m has atleast 4distinct prime factors.
16. Prove that there are infinitely many integers n
for w/c φ(n) is a perfect square.
17. Prove that (n) is odd if n is a perfect
square.18.
Benjier H. Arriola 56
VI – PRIME FUNCTIONS
1. GREATEST INTEGER FUNCTIONS
DEFINITION 6.1
If x is a real number. Let n be the unique integer such that
n ≤ x ≤ n + 1. then we say that n is the integer part of x
and we write [x}] = n.
EXAMPLE 6.1
[4.6] = 4; [√5] = 2; [1/2] = 0; [7] =7; [-2,7] =-3
EXAMPLE 6.2
THEOREM 6.2
EXAMPLE 6.3
THEOREM 6.3
EXAMPLE 6.4
10! =2a 3b5c7d where
A= [10/2] =[10/4]= [10/8] =5+2+1 =8
B=[10/3]+[10/9] = 3+1= 4
C=[10/5] =2
D=[10/7] =1
That is 10!= 28 345271
EXAMPLE 6.5
The power to which 5 enters into the product 25! Is
[25/5]=[25/25] =5+1 =6
DEFINITION 6.2
For any n≥2, let (n) denote the number of primes ≤ n.
EXAMPLE 6.6
Fom the table of primes we see that Π(50) =15 and
Π(1000)=168.
THEOREM 6.5
Let a={[n/p1]+[n/p2]f..+[n/pr]}+ {[n/ p1 p2]}+..[n/ pr-1pr]}
-{[n/ p 1 p2p3]+[n/ pr-2 pr-1 pr]}+…{[n/ p1 p2… pr-1pr]}
Then Π(n) = n-1 +a+ Π( n).
EXAMPLE 6.7
Find the number of primes less than 100.
Benjier H. Arriola 58
EXERCISES 6.1
1. Compute that n!/ n/ Π(a+i). hint;n/ Π(a+i) =(a+n)!/a!
Substituting this in the problem, we must show (a+n)/a!n!! is
an integer.
2. let ø(x) be the sum of the logarithms of all the primes not
exceeding x. prove that ø(x) ≤ Π(x) logex.
3. find the prime factorization of 20!=
2,432,902,008,176,640,000
4. prove that 0 ≤[nx]-n[x] ≤ n-1 for each real number x and
each integer n ≥1.
THEOREM 7.1
If f(x) is a polynomial of degree r w/ integral coefficients
that is, if f(x)=
(a 0xr + a1xr-1+…+ar), and if is a prime such that pXa 0,
then the congruence f(x)= 0
mod p has at most n mutually incongruent solutions
modulo p.
THEOREM 7.2
Let f(x) be a polynomial w/ integer coefficients and
degree r ≥ n.let p be prime,
n ≥ 1. let y be a solution of f(x) = mod p n+1. then y=
(xi+tpn) mod pn+1 where
0 ≤x i< pn, and xi is a solution of f(x)= 0 mod p n such
that 0 ≤t ≤p-1 and t satisfies
59 I
EXAMPLE 7.1
To solve the congruence x 3+2x+2= 0 mod 49.
First we solve x 3+2x+2= 0 mod 7 by trial and error, the
only solutions are x1=2
And x2= 3.by calculus, we have the ist derivative
Let f(x) = x 3+2x+2, so
F(x) = 3x 2+ 2
a)let x1 = 2
f(2)= 2 3+2(2) +2 = 14
f(2) = 3(2) 2 +2= 14
we want to check if there is a slution to exist. 7||14 but
72X 14, so there is no
solution to the congruence tf 1(2) = -f(2)/7 mod 7.
b) let x2 =3
f(3) = 33+2(3)+2 = 35
f1(3) = 3(3)2+2 = 29
7X29, so there is a unique solution
T f1(3)= -f(3)/p mod pn
= 29t= -35/7 mod 7
= 29 t =-5 mod 7
= 29t = 2 mod 7
Therefore we obtain one corresponding solution of
congruence x +2x+2= 0
3
EXAMPLE 7.2
x3+3x+2=5= 0 mod 9
1. trial and error for x3+3x+2=5= 0 mod 3
03 +3(0) +5 ≠ 0 mod 3
13 +3(1) +5 = 0 mod 3
23 +3(2) +5 ≠ 0 mod 3
2. f(x)= x3+3x+2
f1(x)= 3x2+3
3.f(1) = 13+3(1)+5=9
F1= 3(1)2 +3=6
5. 3|6 and 9|9, so there are 3 solutions to the given
congruence.
5. solve for t such that t f1(x)= -f(x) mod pn
P
Benjier H. Arriola 60
EXERCISES 7.2
1. Prove that if f(x)= a0xr + a1xr-1+…+ar and m ias an
integer ,then k!|f(k) is the kth derivative of f.
2. from calculus recall that the taylor series for the
polynomial
f(x)= a0xn + a1xn-1+…+an is
f(x+h) = f(x)+f1(x)h+ f11(x)h2 +…+ f(n) (x)h2
2! n!
Prove that if a 0, a1, an, m, r are integers and p is a
prime, then f(m+rp2) =
R psf1(m) mod ps+1.
3.suppose that f(m) = 0 mod p s and that p†f1(m), where p
is a prime. Use exercise
7.2.2 to prove that there exists an r (unique modulo p)
such that f(m+rps) =
0 mod ps+1
4.
use exercise 7.2.3 to determine the number of solutions of
the congruence
X7+x+1 = mod 343
EXAMPLE 8.1
Since 3 2+42= 52, we see that (3,4,5) is a Pythagorean
triple whose legs are 3
and 4.pythagoras is credited w/ noting that if n isa
positive integer, then (an+1
an2+2n,2n2+2n+1) is a Pythagorean triple.
61 I
THEOREM 8.1
For each integer a> 2 there exists integers b and c such
that (a, b, c) is a Pythagorean triple.
THEOREM 8.2
A triple (a, b, c) is a pythagorean triple if there exists
integers u and v w/c
satisfy the ff. conditions;
a) υ> ν >0
b) υ= ν mod 2
c) υ ν is a perfect square
d) a= ,b= (υ- ν )/2, c=( υ+ ν)/2
EXAMPLE 8.2
THEOREM 8.3
Let p be the number of Pythagorean triples w/a given leg a.
if a is odd, then p=(τ[a2]-
1)/2. if a is even, then p = (τ[a/2)2]-1)/2.
Benjier H. Arriola 62
EXAMPLE 8.3
We know that there are four Pythagorean triples for w/c
one leg is 30. we want to
check by theorem 8.3 since 30 is even we have
p=( τ[252)-1)/2 = (τ(225)-1)/2
=(9-1)/2 = 8/2 = 4.
Similarly, to find how many Pythagorean triples for a= 25 ,
we have
P = (τ(252)-1)/2= (τ(625)-1)/2 = (5-1)/2=4/2 = 2
There are only 2 for such triples.
THEOREM 8.4
Suppose that (x, y, z) is a Pythagorean triple and let d=
(x,y). then d/Z. further if a,
B, and c are integers such that x= ad, y= bd, and z= cd,
then (a, b, c) is a primitive
Pythagorean triple.
EXAMPLE 8.5
The set (6, 8, 10) is not primitive since (6, 8)=2, so 6=3x2,
8= 4x2 and z= 5x2,
. therefore the set (3,4, 5) is a primitive Pythagorean triple.
THEOREM 8.5
If (a, b, c) is a primitive Pythagorean triple, then c is odd
and a≠ b mod 2.
THEOREM 8.6
Let a, b, c be positive integers w/ a even. Then (a, b, c) is
a primitive Pythagorean
Triple if and only if there exist integers x and y such that
1. x> y>0.
2. x≠ y mod 2
3. (x, y) =1
4. a= 2xy, b=x2-y2, and c= x2+y2.
EXAMPLE 8.6
Let x =3, y= 2, by theorem 8.6 the three conditions hold
to find (a, b, c)
63 I
1. 3>2>0
2. 3≠ 2 mod 2
3. (3, 2) =1
Since the three conditions hold so we have
A = 2(3)(2) = 12, b=32-22 = 5, and c= 32+22= 13.
Therefore, 122 + 52 = 132.
EXAMPLE 8.7
The sets (2, 3, 6 7) and (1, 4, 8, 12, 15) are
Generalized Pythagorean numbers,
Since 22+32+62 = 72 and 12+42+82+122 = 152
THEOREM 8.7
Let a 1, a2, a3,…, an be positive integers. Then the
formulas for Generalized
Pythagorean numbers. The ff. are the extension:
a12+,a22,+a32 =a42… a12+,a22,+a32+…+ an-12=an2
if if
a1= ,p 12,-p32 a1= ,p 12,-p22 –p33-…-p2n-2
a2= 2 p 1 p2 a2= 2 p 1 p2
a3= 2 p 1 p3 a3= 2 p 1 p3
a4 = 2 p 1 + p2 +p3
2 2 2
a 4 = 2 p 1 p4
an-1= 2 p 1 pn-2
an= p 12+ p22+p32+…+p2n-1
EXAMPLE 8.8
Let p1= 7, p2 = 4, p3= 3, p4 = 1
A1= 72- 42-32-12 = 23
A2= 2(7)(4) = 56
A3= 2(7)(3) = 42
A4 = 2(7)(1) = 14
A5 = 72 +42=32+12 = 75
562 +232 +422+142 = 752
EXAMPLE 8.9
Let a = 1, b = 2, c= 3, d=4
(12+ 22 )(32 +42) = (1.3 +2.4)2+(1.4-2.3)2
(5)(25) = 112 + (-2)2
125= 112+22
THEOREM 8.9
If p is a prime integer and p=1 mod 4, then p can be
written as the sum of two
squares.
EXAMPLE 8.10
5 can be written as a sum of two squares since 5 =1
mod 4. that is, 5=22 +12.
THEOREM 8.10
A Positive integer n can be represented as a sum of two
squares if its
factorization into powers of distinct primes contains no
odd powers of prime
congruent to 3 modulo 4. by theorem 8.10, 315 cannot
be represented as a sum
of two squares.
EXAMPLE 8.11
315 = 3 2.5.7, Since 3 = 3 mod 4, 5=1 mod 4, and 7= 3
mod 4, therefore 315
contains an odd power of a prime congruent to 3 modulo
4.by theorem 8.10,
315 cannot be represented as sum of two squares.
EXAMPLE 8.12
The factorization of 3185 =5.7 2.13 contains no odd
power of a prime congruent
to 3 modulo 4. hence 3185 is representable as a sum of
two squares. To find two
squares that sum to 3185, we first represent 5, 7 2 and
13.
5=2 2+ 12
72=72+ 02
132=32+ 22
Therefore, 3185 = 5.72.13= (22+ 12)(72+ 02)( 32+ 22)
65 I
THEOREM 8.11
Let p be a prime integer with p = 1 mod 4. then there
is an integer k with 1 ≤ k
p such that
x 2 + 1 = kp
has a solution.
EXAMPLE 8.13
70 = 2.5.7 IS Square-free as are 77.7.11 and 30 =
2.3.5. however, 20= 22.5 and
270 = 2.3 3.5 are not square-free, since 2 2/20 and
3 /270. notice that 1 is a
2
square-free.
THEOREM 8.12
Let n be a positive integer. Then, there is a unique
way of writing n= k2m with
k and m positive integers, and m square-free.
EXAMPLE 8.14
20 = 2 2.5 and 5 is a square-free; 270 =
2.3 .5=3 (2.3.5 ) and 2.3.5 is a square-
3 2
THEOREM 8.14
Benjier H. Arriola 66
THEOREM 8.15
If p >2 is a prime integer, then there is an integer k
with 1≤k<p such that
X2+y2+1 = kp
Has a solution.
THEOREM 8.16
Let p be a prime iteger. Suppose that k is an integer
and that
X 2+y2++z2+w2 = k p
Has a solution. If k is even, then
X 2+y2++z2+w2 =(k/2)p
Has a solution.
THEOREM 8.17
Every positive integer is a sum of four squares.
EXERCISES 8.1
1. For each of the ff. Pythagorean triples find integers υ
and ν that satisfies the conditions of theorem 8.2.
a. (6, 8, 10) d.(16, 30, 34)
b. (14, 48, 50) e. (16, 63, 65)
c.(4961, 6480, 8161)
2. for each of the ff. choices of a, find all Pythagorean
triples having a as their first leg.
a. 5 b. 33 c. 8 d. 7
EXERCISES 8.2
1. Let a 2 + b2 + c2 = d,2 in w/c a, b, c, d are integers
having no other factor
Other than 1.(that is a, b, c,d are a primitive set of
generalized Pythagorean
numbers .)
Prove that:
a. the integer g must be odd; of a, b, c, one is odd, two
are even.
b. Twelve is the greatest number that divides a,b,c,d.
c. If 3/d, 3†abc.
d. If 3†d, 3/abc.
e. If d= 4k-1, 8†abc
f. If d= 4k+1, 16/abc
2. verify that if n is a positive integers, then(2n+1,
2n2+2n,2n2+2n+1)is a
Pythagorean triple.
3.show that if (a, b, c) is a Pythagorean triple and k is any
positive integer then
(ka, kb, kc) is a Pythagorean triple.
4. are there positive integers a and k such that (a, ka, c) is
a Pythagorean triple.?
5. show that if (a, b, c) is a Pythagorean triple such that
2/a but 4†a then 816.
EXAMPLE 9.1
Choose m = 14. the positive integer less than 14 and
relatively prime to 14 are
1, 3, 5, 9,11, and 13. now
a. 1=1 mod 14, 1 2 =1 mod 14 so 1 is the order of 1
mod 14.
b. 3 1=3, 32=9, 33=13, 34=11, 35=5, and 36=1, so the
order of 3 modulo 14 is 6.
c. 5 1=5, 52=11, 53=13, 54=9, 55=3, 56=1 so the order
of 3 modulo 14 is 6.
d. 91=9, 92=11, 93=1, so the order of 9 modulo 14 is 3.
e. 11 1=11, 112=9, 113=1, so the order of 11 modulo 14
is 3.
f. 131=13,132=1, so the order of 13 modulo 14 is 2.
EXAMPLE 9.2
If m=11, you can easily check that each of the integers
2,6,7,8 has order 10=
φ (11) modulo 11. thus, these four integers are each
primitive roots of 11.
in contrast for m=8 there are no primitive roots,
since4(8) =4 and none
of 1,3,5 and 7 have order 4 modulo 8, w/c again is
easily checked.
THEOREM 9.2
Suppose that the positive integer m has a primitive root.
If d is a positive integer
And d/φ (m) =1 and the order of b modulo m is d.
THEOREM 9.2
Let m> 0 and assume that a is a primitive root of m. if
(b, m) =1, then there is an
integer k≥ 1 such that b= a k mod m.
69 I
EXAMPLE 9.3
A. Choose m= 14. the positive integer less than 14 and
relatively prime to 14 are
1,3,5,9,11 and 13. thus φ (14)=6. now modulo 14,
31=3, 32=9, 33=13, 34=11, 35=5,and 36=1,
Therefore, the order of 3 modulo 14 is 6= φ (14) so 3
is a primitive root of 14.
b. if we wish to solve a congruence such as
9x = 5 mod 14
We might argue that 9= 3 2 mod 14 and 5 = 35 mod
14,
So that
3 2x = 35 mod 14
Because (32, 14)=1, we may cancel andd arrive at
X= 3 3=13 mod 14
As the solution.
c. if we were faced w/ the congruence
x4 = 9 mod 14
we would say that 9= 32 mod 14 and so we want
x4 =32 mod 15
since (3, 14 )= 1, we must have (x, 14)=1 and x must
be congruent to some positive power of 3 modulo 14.
let us suppose hat x=3 mod 14. then
k
THEOREM 9.3
Benjier H. Arriola 70
EXAMPLE 9.4
Consider the congruence
X2 = 1 mod 15
Since 42 =1 mod 15 and 4≠ 1 mod 15. theorem 9.3 tells us
that 15 does not have a primitive root.
THEOREM 9.4
Let m be an integer that has a primitive root. Then m
has the form 2, 4, pn w/
P an odd prime and n ≥1.
THEOREM 9.5
Let p be an odd prime and n≥1. if a is a primitive root
of p , then either a or
n
EXAMPLE 9.5
We know from, example 9.2 that 2 is a primitive root
of 11. by theorem 9.5
The root of 2.11=22 is either 2 or 2+11. that is 2 or 13
by checking 210 ≠ 1 mod
22 but 13 10= 1 mod 22. therefore 13 is a primitive root
of 22.
THEOREM 9.6
Let m >1 and let b and c be integers with (b, m)=1= (c,
m). if the order of b
Modulo m is k and the order of c modulo m is n and if (k,
n)=1. then the order of
Bc modulo m is kn.
EXAMPLE 9.6
From example 9.1 the order of 5 modulo 14 is 6 and the
order of 9 modulo 14 is
3, so the order of 35.9 modulo 14 is not equal to 6.3
since(6, 3) ≠ 1.
from example 9.1, the order of 13 modulo 14 is 2, so 13.9
modulo 14 has order
3.2=6, sincr (3, 2) =1.
THEOREM 9.8
Let p be a prime . then p has a primitive root.
THEOREM 9.9
If p is a prime, then p 2 has a primitive root.
THEOREM 9.10
Let p be an odd prime and let n≥ 1. then p n has a
primitive root.
EXAMPLE 9.7
121 has primitive root, since121 = 11 2 and 11 is a
prime.
THEOREM 9.11
If h is the order of modulo m and (k, h)=d, then h/d is
the order of ak modulo m.
EXAMPLE 9.8
From example 9.1. 6 is the order of 3 modulo 14. let k=
2, so (2, 6)=2.
Therefore 6/2 is the order of 3 2 modulo 14. that is 3 is
the order of 9 modulo
14.
THEOREM 9.12
If a is a primitive root of m, then a r is a primitive root of
m iff (r, φ (m)) =1.
EXAMPLE 9.9
We know that 3 is a primitive of 14, since (5, 6)= 1
therefore 3 is a primitive
5
root of 14.
THEOREM 9.13
If there any exist any primitive roots modulo m, there
are exactly φ (φ (m))
mutually incongruent primitive roots.
EXAMPLE 9.10
Benjier H. Arriola 72
EXERCISES 9.1
1. Find all primitive roots (if any) for each of the ff.
integers= 5,7,10,12,13,15.
2. show that 3 is not a primitive rootof 11, although it is a
primitive root of 7.
3. Find a primitive root of 18 and verify theorem 9.2.
4. use the techniques illustrated in example 9.3 to solve
the ff. congruences.
a) 5x = 3 mod 14 c) x 11= 9 mod 14
b) x9= 5 mod 14 d) x 9 = 9 mod 14
5. verify theorem 9.5 by finding an odd primitive root of
7. and checking that it is also an odd primitive root of 14.
do the same for 11 and 22 as well as 13 and 26.
6. show that 18 is not a primitive root of 25 = 5 2, ,
although it is a primitive root of 5. use 18 to find a
primitive root of 25.
EXERCISES 9.2
1. assume that a is a primitive root of p 2, where pis a
prime. Show by example
that a + p may or may not be a primitive root of 25.
2. let m >0 and suppose that a is a primitive root of m.
if (b, m)=1, then there
is a positive integer k such that b = a k mod m. the
least such k is called the
index of b (w/ respect to a and m ) and is denoted
by inda1m(b).
calculate the ff.
a)ind2,5(3) b) ind 2,5(-121)
c) ind3,14(3) d) ind 3,14(13)
3. show that the ff. statements are true for any b, c
such that (b, m)=(c, m)=1.
a) b= c mod m if by inda1m(b) = inda1m(c) mod φ (m).
b) inda,m(bc) = inda,m(b)+ inda,m(c) mod φ (m).
c) inda,m (bt) = t by inda,m(b) mod φ (m).
4. assume that m has a primitive root and let c be
relatively prime to m. if n
≥ 1 and d = (n, φ (m)), show that the congruence xn
= c mod m either has no
Solutions or else has exactly the solutions modulo m.
in the second case
73 I
X QUADRATIC CONGRUENCES
1. EULER’S CRITERION
DEFINITION 10.1 (Quadratic residue)
If congruence x 2 = a mod p where p is a prime has
solutions, then we say that
A is Quadratic residue modulo p.
Benjier H. Arriola 74
EXAMPLE 10.1
3 Is a Quadratic residue mod 11, because 5 2 = 3
mod 11.
Also 2 is a Quadratic residue mod 17, because 6 2 = 2
mod 1
EXAMPLE 10.2
2 is a quadratic non residue mod 5.
3 is a quadratic non residue mod 7.
THEOREM 10.1
If p is an odd prime then there are ½ (p-1) quadratic
non residue modulo p.
EXAMPLE 10.3
Let p = 7, then there are ½ (7-1) = ½(6) = 3
residues and also 3 non residues.
EXAMPLE 10.4
From example 10.1, 3 is a quadratic residue mod
11.by theorem 10.2, 35=1
Mod 11. then 9 is a Quadratic residue.
d) a (p-1)/2
= (a/p) mod p
EXAMPLE 10.5
(3/11)= 1, since 3 is a Quadratic residue mod 11.
(a/3) = 0, since 3/9
(2/5) = -1, since 2 is a Quadratic non residue mod
5.
THEOREM 10.4
Let p > 2 be a prime and a, b € Z w/ (a, p)=
(b,p)=1.
a. if a and b are Quadratic residue mod p,then ab is a
quadratic residue mod p.
b. if a is a Quadratic residue mod p and b is a Quadratic
non residue mod p.
c. if a and b are quadratic non residues mod p, then a b
is a Quadratic residue mod p.
EXAMPLE 10.6
A. we know that 3 and 4 are Quadratic residues mod 11,
so 3x4 = 12 is a
Quadratic residue mod 11.
b. 3 and 6 are Quadratic residue and non residur=e
respectively, so 3x6=18 is a quadratic non residue mod
11.
c. 2 and 6 are quadratic non residue mod 11, therefore
2x6 = 12 is a Quadratic residue mod 11.
THEOREM 10. 5
Let p > 2 be a prime. If p = 1 mod 4, then (-1/p)=1
while
If p=3 mod 4, then (-1/p) = -1
EXAMPLE 10.7
Let us tabulate a few values of (-1/p)
P (-1/p) reason
3 -1 Quadratic residue
is= 1.
5 1 2 2 = -1 mod 5
7 -1 Quadratic residue
are= 1. 4,2
11 -1 Quadratic residue
are = 1, 4, 9, 5, 3
13 1 5 2 = -1 mod 13
17 1 4 2 = -1 mod 17
Now observe if p is any prime, p> 2, then p= 1 mod 4
or p= 3 mod 4, since p
Benjier H. Arriola 76
EXAMPLE 10.9
The set {-5,-4,-3,-2,-1,0,1,2,3,4,5} is a complete set of
least residue modulo m. thus
LR 11(21) = -1, since 21 =-1 mod 11; similarly, LR 11(99) =
0, and LR11(60)= 5.
THEOREM 10.9
If p is an odd prime and(a, p)=1 then the congruence
X 2 = a mod pn
Has solution if and only if (a/p)=1.
EXAMPLE 10.10
Suppose X2 = 15 mod 89
Now (15/89)=(3/89)(5/89)=(89/3)(89/5)
= (2/3)(4/5)= (-1)(1) = -1.
Therefore the given congruence has no solution.
EXAMPLE 10.11
Consider the congruence X 2 = 12 mod 2989.
Since 2989 = 7 2.61, where both 7 and 61 are primes, the
Chinese remainder theorem
tells us that the given congruence has the solution if X 2 =
12 mod 7 and X2 = 12
mod 61 have solutions. now
(12/61)=(4/61)(3/61)=(3/61)=(61/3)=(1/3)=1 and
(12/7)=(4/7)(3/7)= (3/7)= -(7/3)= -(1/3)= -1
Hence, X 2 = 12 mod 7 has no solutions, and therefore the
given congruence has no
Solutions.
5.QUADRATIC CONGRUENCES
CONSIDER AY 2 + BY + C= 0 mod p
(10.1)
Let the discriminant of the quadratic polynomial that
appears in the above
Congruence be
D= b 2 – 4ac
Benjier H. Arriola 78
EXAMPLE 10.12
Solve the congruence 3y 2 + 2y + 3 = 0 mod 11
Given; a =3,b = 2, c= 3, so d= 2 2-4 (3)(3) = -32
Let x = 6y +2, we get
X2 = -32 mod 11
X2 = 1 mod 11
Since (1/11)=(12/11) = 1, so there is a solution to
congruence X2 = 1 mod 11.
By investigating the solution, we have
X = 1 mod 11 = x= 1, 10 mod 11
We have, therefore 6y +2 = 1,10(mod 11), from w/c it
follows that
Y= 5,9 mod 11.
EXAMPLE 10.13
Solve the congruence for x and y;
19x + 7y +19 = 0 mod 15 → (1)
Finding the GCD, we have (10, 7, 15) = 1 so there are 1.15
= 15 solutions.
We note that (10, 15) = 5.also, we see 10x + 7y +19
=15t for some integer
t= 7y +19 = 5(3t +2x). Thus 7y +19 =o mod 5.here (7.5)
=1, so there is 1 solution,
79 I
EXERCISES 10.1
1. Use Gauss’s lemma to show that 17 is a quadratic
residue modulo 19.
2. does the congruence x 2 = 631 mod 1093 have any
solutions? [Hint ; if m =
P 1p2…pk where the pi are odd primes (not necessarily
distinct ), then (n/m)=
(n/p1)…(n/pr)
This extended symbol is called the jacobi symbol.]
3. Does x2 = 17 mod 29 have a solution?
4. Does 3x2 = 12 mod 23 have a solution?
5. Does 2x2 = 27 mod 41 have a solution?
6. Does x2 + 5x = 12 mod 31 have a solution? [ hint;
completing the square.]
7. Does x2 = 19 mod 30 have a solution? [ hint; use the
Chinese remainder theorem.]
8. use Euler’s criterion to determine whether a is a
quadratic residue modulo p in each of the ff.
instances.
a) a = 2, p = 5; b) a = 3, p = 11;
c) a = 4, p = 7; d) a = 6, p = 13.
9. find the distinct (n0n zero) quadratic residues of the
ff. primes; 11, 19, 23, 29.
10. using the results of the exercise 10.1.9, evaluate the
ff.;
a) (4/19) b) (5/29) c)
(17/23)
d) (143/ 8243) e) (3/11) f)
(3/29)
11. Verify theorem 10.3 © by calculating (15/29) in
two ways.
Repeat for (6/11) and (21/23).
12. Evaluate; (2/3),(2/5),(2/7),(2/11),(2/13),(2/17),
(2/19) and (2/23).
Can you see a pattern?
13. Verify that theorem 10.6 holds for each pair of p
= 7, a =2; p=11, a =4,;
And p = 13, a = 7.
14. Verify that quadratic reciprocity law (theorem 10.8)
holds for each pair
Of p = 5, q = 7; p= 5, q= 17; p=7, q= 19; and p=
13, q = 5.
15. Following the examples in the text, calculate;
a) (7/21) b) (10/19) c)
(10/37)
81 I
d) (148/8243) e) (30/101) f)
(170/1667)
16. Use Euler’s criterion (theorem 10.2) to show that
(5/17) = -1, (2/31) = 1, (-1/19)= -1
17. solve; 12x + 10y = 6 mod 42
18. solve; 5x + 3y – 2 = 0 mod 7
EXERCISES 10.2
1. Derive theorem 10.3 ( c) and theorem 10.5 from
Euler’s criterion.
2. prove that if b and c are odd, then (a/bc)=(a/b)(a/c).
3. Prove that if c is odd, then (-1/c) = (-1) 1/2(c-1)
4. Using the quadratic reciprocity law, prove that
(3/p)= } 1 if p = 1 or 11 m0d 12.,
-1 if p = 5 or 7 mod 12
For each odd prime p.
5. is it possible that (n/m) = 1 while the congruence
x2 = n mod m has no solution? Prove your answer.
EXAMPLE 11.1
Let us use the calendar formula to find the day of
the week on w/c August 1,
2003, fell. And y = 2003.Subtituting in the formula we
obtain the number
1 + 1 + 2003 +500 – 20 + 5 = 2490 = 5 mod 7;
Therefore, August 1, 2003 fell on Friday.
Most of us need paper and pencil (or a calculator) to
use the calendar formula
in the theorem . here are some ways to simplify the formula
so that one can do the
calculation in one’s head and amaze one’s friends.
One mnemonic for j (m) is given by
J (m) = [2.6m – 0.2], where 1≤ m ≤ 12.
Another mnemonic for j (m) is the sentence;
My uncle Charles has eaten a cold supper; he eats nothing
hot.
2 5 7=0 3 5 1 4 6 2 4 7=0
3
THEOREM 11.2
The date with month m, day d, year y= 100c + n, where 0
≤n ≤99, has number
D + j(m)+ N+ [n/4]+[c/4] -2c mod 7,
Provided that dates in January and February are treated as
having occurred in the
Previous year.
EXAMPLE 11.2
The birthday of Amalia, the grandmother of Danny and Ella
is December 5, 1906;
on what day of the week was she born?
If A is the number of the day, then
A = 5+4+6+[6/4] + [19/4] – 38 mod 7
= 15+ 1+ 4 -38 mod 7
85 I
-18 mod 7
3 mod 7
Amalia was born on a Wednesday.