Download Solutions to Practice Midterm 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Solutions to Practice Midterm 1
1. True or False:
a) If (x, y) = d then (ax + by, y) = d for all integers a, b > 0. FALSE: for example,
(2, 3) = 1 but (3 · 2 + 1 · 3, 3) = (9, 3) = 3.
b) The linear congruence 124x ≡ 10 (mod 1040) has a solution. FALSE: (124, 1040) = 4
which is not a divisor of 10.
c) If p1 , p2 , p3 are consecutive primes then 2p1 p2 p3 + 1 is a prime number. FALSE:
consider the consecutive primes 5, 7, 11: we have 2 · 5 · 7 · 11 + 1 is divisible by 3.
d) If a ≡ b (mod m) and c|a, c|b, then a/c ≡ b/c (mod m). FALSE: 8 ≡ 2 (mod 6) but
4 6≡ 1 (mod 6) (here a = 8, b = 2, m = 6, c = 2).
e) Any system
x≡a
mod m
x ≡ b mod n
4x ≡ c mod k
of linear congruences has a unique solution modulo mnk. FALSE: the last linear congruence may not even have a solution.
f) If 3|16a then 3|a. TRUE: 3 is prime.
g) 2x3 + x2 + 2 is not divisible by 3 for any integer x. TRUE: if x ≡ 0 (mod 3) then
2x3 + x2 + 2 ≡ 2 6= 0 (mod 3); if x ≡ 1 (mod 3) then 2x3 + x2 + 2 ≡ 2 6= 0 (mod 3); if
x ≡ 2 (mod 3) then 2x3 + x2 + 2 ≡ 1 6= 0 (mod 3).
2. Find gcd(587, 345) and lcm(587, 345) using the Euclidean algorithm.
We have
587 = 345 + 242,
345 = 242 + 103,
242 = 103 · 2 + 36,
103 = 36 · 2 + 31,
36 = 31 + 5,
1
31 = 5 · 6 + 1,
5 = 1 · 5 + 0,
so the gcd is 1.
3. Find gcd(n, n3 − 1) for any n ≥ 1.
There are a couple ways to solve this. We will use the Euclidean algorithm:
n3 − 1 = n · (n2 − 1) + (n − 1),
n = (n − 1) + 1,
n − 1 = 1 · (n − 1) + 0,
so the gcd is 1 if n ≥ 1.
4. Suppose n has prime factorization
n = p51 · p2 · p43
for some distinct primes p1 , p2 , p3 . How many positive divisors does n have?
Because every number has a unique prime factorization, the set of positive divisors of
n is
{pa1 pb2 pc3 | 0 ≤ a ≤ 5, 0 ≤ b ≤ 1, 0 ≤ c ≤ 4}.
Clearly, the number of elements in this set is 6 · 2 · 5 = 60.
5. Does there exist an integer n such that n, n + 2, and 5n + 2 are all primes numbers?
Yes: if n = 3 then these are 3, 5, 17. However, if n > 3, these will never all be simultaneously prime. If n > 3 and n ≡ 0 (mod 3), then n is not prime. If n ≡ 1 (mod 3), then
n + 2 ≡ 0 (mod 3) and so n + 2 is not prime (since n + 2 > 3). If n ≡ 2 (mod 3), then
5n + 2 ≡ 12 ≡ 0 (mod 3), so 5n + 2 is not prime (again, we are using that 5n + 2 > 3
too).
6. Suppose
lcm(a, b) >
ab
2
Find gcd(a, b).
We have lcm(a, b)gcd(a, b) = ab, and since lcm(a, b) >
In other words, it must be 1.
ab
2
7. Find the least non-negative residue of 32011 modulo 22.
2
this means that gcd(a, b) < 2.
This actually uses Euler’s theorem, which is more general than Fermat’s Little Theorem,
but the idea is the same. We know by Euler’s theorem that
3φ(22) = 310 ≡ 1
(mod 22).
Hence we have 32011 = (31 0)201 · 3 ≡ 1 · 3 = 3 (mod 22). So the answer is 3.
8. Determine, with proof, if the following system of congruences has a solution:
x≡1
mod 5
x≡3
mod 6
4x ≡ 2
mod 14
Note that the last congruence, 4x ≡ 2 mod 14, is equivalent to the congruence 2x ≡ 1
mod 7: we have 4x ≡ 2 mod 14 iff 14|4x − 2 iff 4x − 2 = 14k for some k ∈ Z, iff
2x − 1 = 7k iff 2x ≡ 1 mod 7. This last congruence holds true if x ≡ 4 mod 7. Now,
by the Chinese Remainder Theorem, we have that
x≡1
mod 5
x≡3
mod 6
x≡4
mod 7
does have a solution, since 5, 6, 7 are pairwise relatively prime. Alternately, you could
just cook up a solution, like x = 81, but that might take a while.
9. Let p ≥ 3 be a prime number. Find all solutions to
x3 ≡ x mod p
If x ≡ 0 (mod p), then x3 ≡ 0 ≡ x (mod p), so such an x is a solution.
If p 6 |x, then x has a multiplicative inverse y mod p (meaning xy ≡ 1 (mod p)), and so
x3 ≡ x (mod p) iff x3 y ≡ xy (mod p), which is iff x2 ≡ 1 (mod p). In class, we showed
that this happens iff x ≡ ±1 (mod p). So the solutions are any x which is 0, 1, or −1
(mod p).
10. Does the equation
4x + 16y = 22
have solutions with x and y integers?
No: (4, 16) = 4 which is not a divisor of 22, so there can be no solution.
3
Related documents