Você está na página 1de 2

Math 347

Worksheet: Number Theory II

A.J. Hildebrand

Number Theory, II: Congruences


Congruences are a simple, but extremely useful concept in number theory. The magic of congruences (modular arithmetic) can often turn an otherwise complex and lengthy argument into a couple of lines. This worksheet summarizes the basic denitions and results about congruences that you need to know, and has exercises that illustrate the wide variety of applications of congruences. Denition of a congruence. Let a, b Z, and m N. We say a is congruent to b modulo m, and write a b mod m, if m | (a b). The integer m is called the modulus of the congruence. Notes. Equivalent denition: a b mod m means that a = b + km for some k Z, i.e., that a and b dier by an integer multiple of m. Connection with divisibility: Let a Z and d N. Then d | a if and only if a 0 mod d. Connection with the division algorithm: Let a Z, b N, and let r be the remainder obtained when dividing a by b, using the division algorithm; i.e., a = qb + r, where q, r Z and 0 r < b. Then a r mod b. Properties of congruences. What makes congruences so useful is that, to a large extent, they can be manipulated like ordinary equations. Congruences to the same modulus can be added, multiplied, and taken to a xed positive integral power; i.e., for any a, b, c, d Z and m N we have: 1. If a b mod m and c d mod m, then a + c b + d mod m. 2. If a b mod m and c d mod m, then ac bd mod m. 3. If a b mod m and k N, then ak bk mod m. 4. If a b mod m and P (x) is a polynomial with integer coecients, then P (a) P (b) mod m. Notes. Congruences to dierent moduli cannot be added or multiplied in a similar manner. Since congruences are only dened for integers, dividing two congruences would make no sense. Congruences can not be exponentiated; i.e., it is not true that a b mod m and c d mod m implies ac bd mod m. (However, by the above properties, one can take each side of a congruence a b mod m to the same power k .) Fermats Little Theorem:. Let p be a prime and a N such that p a. Then ap1 1 mod p. Note. The modulus p in Fermats Theorem must be prime. For composite moduli, the stated congruence is (in general) false. (For example, for modulus 5, which is prime, 351 = 81 1 mod 5, but for modulus 6, 361 = 243 3 mod 6.)

Math 347

Worksheet: Number Theory II

A.J. Hildebrand

Congruences: Problems
The following problems illustrate some of the main applications of congruences. Some of the problems will be worked out in class, others will be part of the homework assignments. 1. Divisibility properties of large numbers: (a) Show that 3 divides 4n 1 for all n N. (b) (HW) Show that 7 divides 43n+1 + 23n+1 + 1 for all n N. (c) Find the remainder of 31001 when divided by 5. (d) Find the reminder of 3471001 when divided by 3. (e) (HW) Find the remainder of 347101 when divided by 101. (Hint: Note that 101 is prime, and use Fermats Little Theorem.) 2. Divisibility of polynomials: (a) Using congruences, show that n5 n is divisible by 3 for all n N. (b) Using congruences, show that 6 divides n3 + 5n for all n N. (c) Using congruences modulo 2, show that the equation 3x2 x = 2y 2 + 1 has no integer solutions. (d) (HW) Using congruences modulo 4, show that the equation x2 + y 2 = 4z + 3 has no integer solutions. 3. Divisibility tests. First recall the precise meaning of a base b representation of an integer n N (where the base b is an integer with b 2): k (1) n = (ak ak1 . . . a0 )b n = i=0 ai bi , with the digits ai satisfying ai {0, 1, . . . , b 1} and ak = 0. (a) Divisibility by 9: Given n N, let s(n) denote the sum of the digits of n in decimal (i.e., base 10) representation; i.e., s(n) = a0 + a1 + , where the ai are as in (1). Show that n s(n) mod 9. Deduce from this result the familiar divisibility test for 9: an integer is divisible by 9 if and only if the sum of its decimal digits is divisible by 9. (b) (HW) Divisibility by 11: Given n N, let t(n) denote the alternating sum of its decimal digits starting from the right; i.e., t(n) = a0 a1 + a2 a3 + , where the ai are as in (1). (For example, if n = 347, then t(n) = 7 4 + 3 = 6, and if n = 1001, then t(n) = 1 0 + 0 1 = 0.) Show that n t(n) mod 11. Deduce from this result the following divisibility test for 11: an integer is divisible by 11 if and only if the alternating sum of its decimal digits, starting from the right, is divisible by 9. 4. Last digits of large numbers: The last (rightmost) digit in the base b representation of an integer n N is congruent to n modulo b. This follows since bi 0 mod b for i 1 and b0 = 1, and hence, in the base b representation (1), all terms except for a0 , the last digit of n, are congruent to 0 modulo b. Moreover, since a digit in a base b representation must be in the interval [0, b 1], this digit is uniquely determined by the congruence of n modulo the base b. This fact can be used, along with the properties of congruences (and especially the fact that congruences can be taken to a xed power), to quickly, and with minimal amounts of computations, nd the last digits of very large numbers, as illustrated by the following examples. (a) Find the last decimal digit of 3347 . (b) (HW) Find the last digit in the base 8 expansion of 91000 , 101000 , 111000 .

Você também pode gostar