You are on page 1of 7

PMATH 340 Midterm

Michael Coons February 12, 2010


Name:

Student Number:

Instructions: Attempt each problem. Simple calculators are allowed. Explain your work carefully, and completely. If you are using a result from class, or the notes, give an indication of which result (i.e., explicitly write by Fermats little theorem ). If you run out of room, please continue elsewhere, and leave a clear indication of where that is. There are extra numbered sheets at the end of this exam for that reason.

/40
University of Waterloo, Waterloo, Ontario email: mcoons@math.uwaterloo.ca

1. (6 pts) Find a, b N such that a + b = 78 gcd(a, b) = 6 lcm(a, b) = 252.

Solution. From a homework assignment we know that gcd(a, b) lcm(a, b) = ab. So ab = 252 6 = 1512. Now we know that a + b = 78. Remember that any pair of integers is uniquely determined by there sum and product. To nd a and b, consider the equation (x a)(x b) = 0. The roots of this are exactly a and b. Also (x a)(x b) = x2 (a + b)x + ab = x2 78x + 1512 = 0, so that using the quadratic formula we have 78 782 4 1512 6084 6048 36 x= = 39 = 39 = 39 3. 2 2 2 So x = 36 and x = 42 are zeros of x2 78x + 1512, so that we may choose a = 36 and b = 42. To check our answer, we can easily see that 36 + 42 = 78 gcd(36, 42) = 6 lcm(36, 42) = 252.

2. (7 pts) Prove that there are innitely many pseudoprimes. [Hint: Show that if n is a pseudoprime, then Mn is a larger one. Recall that Mn is the nth Mersenne number.]

Proof. Let n be a pseudoprime. Since n is a pseudoprime we have that n is composite, and 2n 2 (mod n), so 2n = kn + 2 for some k N. If we put x = 2n , then from the identity, xk 1 = (x 1)(xk1 + xk2 + + x + 1), we see that 2n 1|(2n )k 1; thus 2nk 1 (mod 2n 1), so 22
n

= 2kn 2 2 (mod 2n 1).

Also by the above identity we know that if n is composite, so is Mn (also proved in class). Since 341 is a pseudoprime, the sequence 341, M341 , MM341 , MMM341 , . . . is an innite sequence of pseudoprimes.

3. Recall that the nth Fermat number is given by Fn = 22 + 1 for n 0. a. (4 pts) Show that F0 F1 Fn1 + 2 = Fn for n 1. b. (4 pts) Show that distinct Fermat numbers are relatively prime.

Proof. (a.) By induction. Note that for n = 1, we have F0 + 2 = 22 + 1 + 2 = 5 = 22 + 1 = F1 . Now suppose that the result holds for n = k 1. Then F0 F1 Fn2 Fn1 + 2 = (F0 F1 Fn2 )Fn1 + 2 = (Fn1 2)Fn1 + 2 = (22 = (22 = (2 =2
2
n1 0 1

+ 1 2)(22 1)(22
n1

n1

+ 1) + 2

n1 n

+ 1) + 2

1) + 2

2n

+1

= Fn , and so the result holds for k = n, and so by induction for all n N. (b.) Let m > n be two nonnegative integers. Then using the result from part (a.) we have F0 F1 Fm1 , 2 = Fm Fn Fn
F where since m > n we have that F0 F1 Fn m1 is an integer. Thus we have written 2 as a linear combination of Fn and Fm , and so we have that gcd(Fn , Fm )|2. Thus gcd(Fn , Fm ) = 1 or gcd(Fn , Fm ) = 2. Since Fn and Fm are both odd, it must be the case that gcd(Fn , Fm ) = 1, and this proves the result.

4. (6 pts) Prove Euclids lemma; that is, show that if a|bc and gcd(a, b) = 1, then a|c.

Proof. Since gcd(a, b) = 1 there are x, y Z such that 1 = ax + by. Multiplication by c gives c = 1 c = (ax + by)c = acx + bcy. Since a|ac and a|bc, we have that a|(acx + bcy), so that a|c.

5. (7 pts) Find the last digit of the number 3n + 2 in terms of a congruence condition on n.

Solution. We try powers of 3 modulo 10, and notice that 30 1 (mod 10), 31 3 (mod 10), 32 9 (mod 10), 33 7 (mod 10), 34 1 (mod 10), thus it starts repeating, so that we have a condition on n modulo 4. We see that the last digit of 3n + 2 is then 3 if n 0 (mod 4) 5 if n 1 (mod 4) = 1 if n 2 (mod 4) 9 if n 3 (mod 4). To prove this write n = 4k + i for some i = 0, 1, 2, 3 by the division algorithm. Then 3n + 2 34k+i + 2 (34 )k 3i + 2 3i + 2 (mod 10), and we have already computed this with i = 0, 1, 2, 3 above.

6. (6 pts) (Ancient Chinese Problem) A band of 17 pirates stole a sack of gold coins. When they tried to divide the fortune into equal portions, 3 coins remained. In the ensuing brawl over who should get the extra coins, one pirate was killed. The wealth was redistributed, but this time the equal division left 10 coins. Again an argument developed, and again one pirate was killed. But now the fortune was evenly distributed among the survivors. What was the least number of coins that could have been stolen?

Proof. This problem translates to the system x 3 (mod 17) x 10 (mod 16) x 0 (mod 15) where x denotes the number of coins. We may eliminate the last congruence noting that x = 15k for some k Z, and change the system to 15k 3 (mod 17) 15k 10 (mod 16). Multiplying by inverses simplies this system to k 7 (mod 17) k 6 (mod 16) so that we may now apply the Chinese Remainder Theorem. Note that so that k = i 1 2 ai 7 6 ni 17 16 Ni 16 17 xi 16 1 ai Ni xi 1792 102

1792 + 102 = 1894 262 ( mod 16 17). Now x = 15 262 = 3930. So the least number of coins that could have been stolen is 3930.

You might also like