Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
MATH10040: Numbers and Functions
Homework 3: Solutions
√
1. Let p be a prime number and n > 1. Prove that n p is irrational.
√
Solution: Suppose FTSOC that n p is rational. Then there exist
√
nonzero integers a, b satisfying (a, b) = 1 and n p = a/b.
Taking nth powers we get the equation
p=
an
bn
and hence pbn = an . Therefore p|an and, since p is prime, it follows
that p|a.
So a = pc for some integer c. Therefore pbn = an = (pc)n = pn cn .
Dividing by p gives bn = pn−1 cn . Since n − 1 ≥ 1, p divides the
right-hand side and hence p|bn . But then, since p is prime, p|b.
Thus p|a and p|b contradicting (a, b) = 1.
2. Let a, n > 1 be integers.
(a) Show that an − 1 is composite unless a = 2 and n is a prime
number. [Use the identity xn − 1 = (x − 1)(1 + x + · · · + xn−1 ).]
(b) Find the smallest prime number p for which 2p − 1 is composite.
(You can use your calculator.)
Solution:
(a) Suppose that an −1 is prime. Since an −1 = (a−1)(1+· · ·+an−1 )
and the second factor here is an integer greater than 1, it follows
that a − 1 = 1 (since an − 1 has no nontrivial factorizations) and
hence a = 2.
Suppose FTSOC that n were composite. Then n = rs with
1 < r, s < n. It follows that
an − 1 = 2rs − 1 = (2r )s − 1 = (2r − 1)(1 + 2r + · · · + (2r )s−1 )
is a nontrivial factorization of an − 1, contradicting the supposition that an − 1 is prime. Thus n cannot be composite; i.e. n is
a prime number (if an − 1 is prime).
(b) 22 − 1 = 3, 23 − 1 = 7, 25 − 1 = 31, 27 − 1 = 127 are all prime.
However 211 − 1 = 2047 = 23 · 89 is composite.
3. Let a, b be nonzero integers and let p1 , . . . , pt be the prime numbers
mt
1
which divide a or b. Write a = pn1 1 · · · pnt t and b = pm
where
1 · · · pt
n1 , . . . , nt , m1 , . . . , mt ≥ 0.
(a) Show that a|b if and only if ni ≤ mi for i = 1, . . . , t.
(b) Let s1 = min{n1 , m1 }, s2 = min{n2 , m2 }, . . . , st = min{nt , mt }.
Show that (a, b) = ps11 . . . pst t . [Use the definition of greatest
common divisor and the previous part of this question.]
Solution:
(a) First suppose that ni ≤ mi for i = 1, . . . , t. Let ri = mi − ni ≥ 0
for each i. Let c = pr11 · · · prt t ∈ Z. Then
mt
1
ac = (pn1 1 · · · pnt t )(pr11 · · · prt t ) = pn1 1 +r1 · · · pnt t +rt = pm
1 · · · pt = b.
Thus a|b.
Conversely, suppose that a|b. Then b = ac for some integer c.
Now c|b so every prime divisor of c is a prime divisor of b. Thus
the prime divisors of c lie among the primes p1 , . . . , pt . Thus
there are integers ri ≥ 0 such that c = pr11 · · · prt t . Therefore
n1
r1
n1 +r1
mt
nt
rt
1
pm
· · · pnt t +rt .
1 · · · pt = b = ac = (p1 · · · pt )(p1 · · · pt ) = p1
By the Fundamental Theorem of Arithmetic (i.e. uniqueness of
factorization) mi = ni +ri for i = 1, . . . , t. Since ri ≥ 0, it follows
that mi ≥ ni for all i.
(b) Let h = ps11 . . . pst t . Since si ≤ mi , ni for each i, it follows from
part (1) that h|a and h|b. So h is a common divisor of a and b.
Let f = pr11 . . . prt t be any other common divisor. Since f |a,
ri ≤ mi for all i by part (1). Since f |b, ri ≤ ni for all i by part
(1). Thus ri ≤ min{mi , ni } = si for all i. By part (1) again, f |h,
and, in particular, f ≤ h. So h = (a, b), as required.
4. (a) Factorize 30! as a product of powers of primes.
(b) Factorize 30!/15! as a product of powers of primes.
(c)
30!
15!15!
is an integer. Factorize this number as a product of powers of
primes.
Solution:
(a) For each prime p less than 30 we calculate the exact power which
divides 30!:
30
30
30
30
p=2:
+
+
+
= 15 + 7 + 3 + 1 = 26.
2
4
8
16
30
30
30
p=3:
+
+
= 10 + 3 + 1 = 14.
3
9
27
and so on. This gives
30! = 226 · 314 · 57 · 74 · 112 · 132 · 17 · 19 · 23 · 29.
(b) Similarly, 15! = 211 · 36 · 53 · 72 · 11 · 13. Thus
30!
226 · 314 · 57 · 74 · 112 · 132 · 17 · 19 · 23 · 29
=
15!
211 · 36 · 53 · 72 · 11 · 13
15
8
4
= 2 · 3 · 5 · 72 · 11 · 13 · 17 · 19 · 23 · 29.
(c) (15!)2 = 222 · 312 · 56 · 74 · 112 · 132 . So
30!
= 24 · 32 · 5 · 17 · 19 · 23 · 29.
(15!)2
5. (a) Suppose that m ∈ N with (m, 10) = 1. Given any a, b, c ∈
{0, 1, . . . , 9} show that there is a multiple of m which ends in the
three digits abc.
(b) Without using a calculator or computer, find a multiple of 99
which ends in the digits 123.
Solution:
(a) Fix a, b, c ∈ {0, . . . , 9} and let n = 100a+10b+c. Thus a positive
integer k ends in the three digits abc if and only if k = 1000t + n
for some integer t ≥ 0.
Thus, given m with (m, 10) = 1 we are required to show that
there exists an integer s such that sm = 1000t + n for some
integer t ≥ 0; i.e. we must show that the equation sm − 1000t =
n is solvable in integers s and t (we have seen in a previous
exercise that if there are any solutions, then there are solutions
with t > 0) .
However, (m, 10) = 1 =⇒ 2, 5 6 |m =⇒ (m, 1000) = 1. Therefore
the equation sm − 1000t = n is solvable.
(b) We wish to solve 99s − 1000t = 123.
We use Euclid’s algorithm: 1 = 1000 · 10 − 101 · 99.
More generally, 1 = 1000 · (10 − 99m) + 99 · (1000m − 101) for
any integer m.
Taking m = 1 (since we would like a negative multiple of 1000
and a positive multiple of 99) gives us 1 = 1000 · (−89) + 99 · 899.
Multiplying by 123 gives 123 = −1000 · (89 · 123) + 99 · (123 · 899).
Therefore (123 · 899) · 99 = 1000 · (123 · 89) + 123.
[Remark: For any integer m we have (subtracting 1000 · 99 · m
from both sides)
(123 · 899 − 1000m) · 99 = 1000 · (123 · 89 − 99m) + 123.
Taking m = 110 we get the smaller solution
577 · 99 = 1000 · 57 + 123.]
6. Find the remainder of 355 + 553 on division by 7.
Solution: We have
27 = 33 ≡ −1
(mod 7) =⇒ 36 = (33 )2 ≡ (−1)2 ≡ 1
(mod 7).
So 3n ≡ 1 (mod 7) whenever n is a multiple of 6.
Now 54 is a multiple of 6. Thus
355 ≡ 31 = 3
(mod 7).
Also
(mod 7) =⇒ 553 ≡ (−1)3 ≡ −1
55 ≡ −1
(mod 7).
So
355 + 553 ≡ 3 + (−1) ≡ 2
(mod 7).
The answer is: 2
7. What is the last digit of 357358 ?
Solution: The last digit (in the decimal expansion) of a number is
just its remainder on division by 10.
Now 357 ≡ 7 (mod 10). 72 = 49 ≡ −1 (mod 10) =⇒ 74 ≡ (72 )2 ≡
(−1)2 ≡ 1 (mod 10). It follows that 7n ≡ 1 (mod 10) whenever 4|n.
Now 358 = 4 · 89 + 2 = 356 + 2.
Therefore 357358 ≡ 7358 ≡ 7356 · 72 ≡ 72 ≡ 9 (mod 10). So the
remainder is 9.