Chapter 4
Chapter 4
Chapter 4
1*
30. For all integers m, ifm is even then 3m+5 is odd. “Proof: Suppose m is an even integer and n is an
odd integer .If m·n is even, then by definition of even
31. If k is any odd integer and m is any even integer, then, k 2+ mthere
2
exists an integer r such that m·n =2r. Also since m
is odd. is even, there exists an integer p such that m =2p, and
since n is odd there exists an integer q such that
32. If a is any odd integer and b is any even integer, then, n=2 q+1Thus
2 a+3 b is even.
mn=(2 p)(2 q+1)=2 r ,
33. If n is any even integer, then(−1)n =−1.
where r is an integer. By definition of even, then, m·n is
34. If n is any odd integer, then (−1)n =−1. even, as was to be shown.”
Prove that the statements in 35–37 are false. 42. Theorem: The sum of any two even integers equals
4k for some integer k. “Proof: Suppose m and n are any
35. There exists an integer m ≥3 such that m 2 −1 is prime. two even integers. By definition of even, m =2k for
36. There exists an integer n such that 6 n2 +27 is prime. some integer k and n =2k for some integer k. By
substitution,
37. There exists an integer k ≥4 such that 2 k 2 −5k+2 is prime.
m+n =2k+2k =4k.
Find the mistakes in the “proofs” shown in 38–42. This is what was to be shown.”
2
38. Theorem: For all integers k, if k > 0 then k +2k+1 is In 43–60 determine whether the statement is true or
composite. false. Justify your answer with a proof or a
counterexample, as appropriate. In each case use only
“Proof”: For k =2 , k 2 +2 k +1=22 +2 ·2+1=9.But 9=3 ·3 ,
the definitions of the terms and the Assumptions listed
and so 9 iscomposite. Hence the theorem istrue.”
on page 146 not any previously established properties.
39. Theorem: The difference between any odd integer and any
43. The product of any two odd integers is odd.
even integer is odd.
44. The negative of any odd integer is odd.
“Proof: Suppose n is any odd integer, and m is any even
integer. By definition of odd, n=2 k +1 wherek is an integer, 45. The difference of any two odd integers is odd.
and by definition of even, m=2 k where k is an integer. Then
46. The product of any even integer and any integer is
n−m=( 2 k +1)−2 k=1. even.
47. If a sum of two integers is even, then one of the
summands is even. (In the expression a+b, a and b are
called summands.)
57. If m and n are positive integers and mn is a perfect
48. The difference of any two even integers is even.
square, then m and n are perfect squares.
51. For all integers n, if n is prime then (−1)n ¿−1.
58. The difference of the squares of any two
2
52. For all integers m, if m > 2 then m −4 is composite. consecutive integers is odd.
59. For all nonnegative real numbers a and b,
53. For all integers n,n2 −n+11 is a prime number.
√ ab=√ a √ b. (Note that if x is a nonnegative real
54. For all integers n,4 ¿ +n+ 1¿−3 n2 is a perfect square. number, then there is a unique nonnegative real
number y, denoted √ x , such that y 2 = x.
55. Every positive integer can be expressed as a sum of three or
fewer perfect squares. 60. For all nonnegative real numbers a and b,
56. (Two integers are consecutive if, and only if, one is one √ a+b=√ a+√ b .
more than the other.) Any product of four consecutive integers
is one less than a perfect square. 61. Suppose that integers m and n are perfect squares.
Then m + n + 2√ mn is also a perfect square. Why?
Proof: Suppose that r is (a) . By definition of rational, r Use the properties of even and odd integers that are listed in
=a/b for some (b) with b ≠ 0. By substitution, Example 4.2.3 to do exercises 21–23. Indicate which
properties you use to justify your reasoning.
r 2=(c )=a2 /b 2 .
21. True or false? If m is any even integer and n is any
Since a and b are both integers, so are the products a 2 and odd integer, then m 2 +3n is odd. Explain.
(d) Also b 2 ≠0 by the (e) . Hence r 2is a ratio of two integers
with a nonzero denominator, and so (f) by definition of 22. True or false? If a is any odd integer, then a 2+ ais
rational. even. Explain.
13. Consider the statement: The negative of any rational 23. True or false? If k is any even integer and m is any
number is rational. odd integer, then ¿ is even. Explain.
a. Write the statement formally using a quantifier and a Derive the statements in 24–26 as corollaries of Theorems 4.2.1,
variable. 4.2.2, and the results of exercises 12, 13, 14, 15, and 17.
b. Determine whether the statement is true or false and 24. For any rational numbers r and s,2 r +3s is rational.
justify your answer. 25. If r is any rational number, then 3 r 2 −2r +4 is
rational.
26. For any rational number s,5 s 3 +8 s2 −7 is rational.
33.When expressions of the form ( x−r )( x−s) are multiplied
out, a quadratic polynomial is obtained. For instance,
27. It is a fact that if n is any nonnegative integer, then
( x−2)(x−(−7))=( x−2)(x +7) = x 2 +5 x−14.
1 1 1 1 1−(1/2n+ 1) a. What can be said about the coefficients of the polynomial
1+ + 2 + 3 + …+ n =
2 2 2 2 1 obtained by multiplying out (x −r)(x −s) when both r and s
1−( )
2 are odd integers? when both r and s are even integers? when
one ofr and s is even and the other is odd?
(A more general form of this statement is proved in Section
5.2). Is the right-hand side of this equation rational? If so, b. It follows from part (a) that x 2 −1253 x+ 255cannot be
express it as a ratio of two integers. written as a product of two polynomials with integer
28. Suppose a,b,c,and d are integers and a ≠ c.Suppose also coefficients. Explain why this is so.
that x is a real number that satisfies the equation. 34.Observe that ( x−r )( x−s)(x−t )
ax+ b
=1.Must x be rational? If so, express x as a ratio of two¿ x 3−( r + s+t ) x 2 +( rs+ rt+ st) x−rst .
cx +d
integers. a. Derive a result for cubic polynomials similar to the
result in part (a) of exercise 33 for quadratic
29.Suppose a, b, and c are integers and x, y, and z are
polynomials.
nonzero real numbers that satisfy the following equations:
b. Can x 3+ 7 x2 −8 x−27 be written as a product of three
xy xz yz polynomials with integer coefficients? Explain.
=a and =b and =c .
x+ y x+ z y+ z
In 35–39 find the mistakes in the “proofs” that the sum of
Is x rational? If so, express it as a ratio of two integers. any two rational numbers is a rational number.
30. Prove that if one solution for a quadratic equation of the 35. “Proof: Any two rational numbers produce a rational
form x 2+ bx+ c=0 is rational (where b and c are rational), number when added together. So if r and s are particular
then the other solution is also rational. (Use the fact that if but arbitrarily chosen rational numbers, then r +s is
the solutions of the equation are r and s, rational.”
then x 2 +bx +c=( x−r )( x−s ). ¿ 1 1
36. “Proof: Let rational numbers r = and s= be given.
31. Prove that if a real number c satisfies a polynomial 4 2
equation of the form 1 1 3
Then r + s= + = ,which is a rational number.This is
4 2 4
r 3 x3 + r 2 x 2+ r 3 x 1 +r 0=0 , what was to be shown.”
Where r 0 , r 1 ,r 2, and r 3 are rational numbers, then c 37. “Proof: Suppose r and s are rational numbers. By
satisfies an equation of the form definition of rational, r =a/b for some integers a and b
with b ≠0, and s =a/b for some integers a and b with b
n3 x 3+ n2 x 2 +n3 x 1+ n0=0 , ≠0. Then
which is a quotient of two integers with a nonzero 17.Consider the following statement: negative of any
denominator. Hence it is a rational number. This is multiple of 3 is a multiple of 3.
what was to be shown.” a. Write the statement formally using a quantifier
and a variable.
31. For all integers a and b, ifa|10b then a|10 or a|b. What is the standard factored form for a 3?
0Find the least positive integer n such that
32. A fast-food chain has a contest in which a card with
numbers on it is given to each customer who makes25 a ·3 · 52· 73 · k is a perfect cube (i.e., equals an integer to
purchase. If some of the numbers on the card add up to third
the 100, power). Write the resulting product as a perfect
cube.
then the customer wins $100. A certain customer receives a
card containing the numbers
40. a. If a and b are integers and 12a =25b, does 12
|b? does 25|a? Explain.
72,21,15,36,69,81,9,27,42,and 63
b. If x and y are integers and 10x =9y, does 10|y? does9
Will the customer win $100? Why or why not?
|x? Explain.
33. Is it possible to have a combination of nickels, dimes,
and quarters that add up to $4.72? Explain.
H 41 How many zeros are at the end of 458·885?
Explain how you can answer this question without
34. Is it possible to have 50 coins, made up of pennies,
actually computing the number. (Hint: 10=2·5.)
dimes, and quarters, that add up to $3? Explain.
42. If n is an integer and n > 1, then n! is the product
35. Two athletes run a circular track at a steady pace so that
of n and every other positive integer that is less than
the first completes one round in 8 minutes and the second in
n. For example, 5!=5·4·3·2·1.
10 minutes. If they both start from the same spot at 4 P.M.,
when will be the first time they return to the start together?
a. Write 6! in standard factored form.
36. It can be shown (see exercises 44–48) that an integer is
b. Write 20! in standard factored form.
divisibleby3if, and only if , the sum of its digits is divisible by
3. An integer is divisible by 9 if, and only if, the sum of its
digits is divisible by 9. An integer is divisible by 5 if, and c.Without computing the value of (20 !)2
only if, its right-most digit is a 5 or a 0. And an integer is determine how many zeros are at the end of this
divisible by 4 if, and only if, the number formed by its right- number when it is written in decimal form.
most two digits is divisible by 4. Check the following integers Justify your answer.
for divisibility by 3, 4, 5 and 9.`
✶43 In a certain town 2/3 of the adult men are
a. 637,425,403,705,125 b. 12,858,306,120,312 married to 3/5 of the adult women. Assume that all
c. 517,924,440,926,512 d. 14,328,083,360,232 marriages are monogamous (no one is married to
more than one other person). Also assume that there
37.Use the unique factorization theorem to write the are at least 100 adult men in the town. What is the
following integers in standard factored form. least possible number of adult men in the town? of
adult women in the town?
a. 1,176 b. 5,733 c. 3,675
Definition: Given any nonnegative integer n, the
38.Suppose that in standard factored form a= p p … p
e1 e2 ek decimal representation of n is an expression of the
1 2 k
form.
,where k is a positive integer; p1 , p2 , .. pk are prime numbers;
d k d k−1 … d 2 d 1 d 0
and e 1,e 2,...,e k are positive integers.
Where k is a non negative integer;d 2 , d 1 , d 0 , … , d k
(called the decimal digits of n) are integers from 0
a. What is the standard factored form for a 2?
to 9 inclusive; d k ≠0 unless n =0 and k =0; and
b. Find the least positive integer n such that 25·3·52·73·n is a
perfect square. Write the resulting product as a perfect square. n=d k .10 k + d k−1 . 10k−1 +…+ d2 .10 2+ d 1 .10+d 0
Since the sum of the digits of 7524 is divisible by 9, 7524 can 15. January 1, 2000, was a Saturday, and 2000 was a leap
be written as a sum of two integers each of which is year. What day of the week will January 1, 2050, be?
divisibleby9.Itfollowsfromexercise15that7524isdivisible by 9.
16. Suppose d is a positive integer and n is any integer. If
Generalize the argument given in this example to d∨n , what is the remainder obtained when the quotient
any nonnegative integer n. In other words, prove that for any remainder theorem is applied to n with divisor d?
nonnegative integer n, if the sum of the digits of n is divisible
by 9, then n is divisible by 9. 17. Prove that the product of any two consecutive integers
is even.
48.✶ Prove that for any nonnegative integer n, if the sum of
the digits of n is divisible by 3, then n is divisible by 3. 18. The result of exercise 17 suggests that the second
apparent blind alley in the discussion of Example 4.4.7
49.✶ Given a positive integer n written in decimal form, the might not be a blind alley after all. Write a new proof of
alternating sum of the digits of n is obtained by starting with Theorem 4.4.3 based on this observation.
the right-most digit,subtracting the digit immediately to its
left, adding the next digit to the left, subtracting the next digit, 19. Prove that for all integers n,n2 −n+3 is odd.
and so forth. For example, the alternating sum of the digits of
180,928 is 8−2+9−0+8−1=22. Justify the fact that for any 20. Suppose a is an integer. If a mod7=4, what is 5a mod7?
nonnegative integer n, if the alternating sum of the digits of n In other words, if division of a by 7 gives a remainder of 4,
is divisible by 11, then n is divisible by 11. what is the remainder when 5a is divided by 7?
28. a. Use the quotient-remainder theorem with d =3 to H39.The sum of any four consecutive integers has the form
prove that the product of any three consecutive integers is 4k+2 for some integer k.
divisible by 3.
b. Use the mod notation to rewrite the result of part (a). 40. For any integer n, n(n 22 −1)(n+2) is divisible by 4.
41. For all integers m,m 2 =5k, or m 2 =5k+1, or m 2 =5k+4 for
H29.a.Use the quotient-remainder theorem with d =3 to prove some integer k.
that the square of any integer has the form 3k or 3k+1 for
some integer k. H42.Every prime number except 2 and 3 has the form 6q +1 or
b. Use the mod notation to rewrite the result of part (a). 6q +5 for some integer q.
30. a. Use the quotient-remainder theorem with d =3 to 43. If n is an odd integer, then n 4 mod 16=1.
prove that the product of any two consecutive integers has
the form 3k or 3k+2 for some integer k.
H44. For all real numbers x and y ,∨x∨·∨ y∨¿∨xy∨.
b. Use the mod notation to rewrite the result of part (a).
45. For all real numbers r and c with c ≥0 , if −c ≤r ≤ c ,
In 31–33, you may use the properties listed in Example
then ¿ r∨≤c .
4.2.3.
✶51.If m ,n ,a, b, and d are integers, d > 0, and m mod d=a a. If d∨n, then n = ⌊ n/ d ⌋·d.
and n mod d=b, is (m+n) mod d = a+b? Is (m+n) mod d = b. If n=⌊ n/d ⌋ · d , then d∨n .
(a+b) mod d? Prove your answers. c. Use the floor notation to state a necessary and sufficient
condition for an integer n to be divisible by an integer d.
H 13 For any integer n, n2 −2 is not divisible by 424. The reciprocal of any irrational number is irrational.
H 14.For all prime numbers a,b, andc,a 2 +b 2 ≠c 2.. reciprocal of a nonzero real number x is 1/ x .)
H15. If a,b, and c are integers and a 2 +b 2 = c 2, then at least
one of a and b is even. H25. For all integers n, if n2 is odd then n is odd.
H✶16.For all odd integers a,b, and c, if z is a solution of 26. For all integers a,b, and c, if a X bc then a X b.
ax 2 +bx +c=0 then z is irrational. (In the proof, use the (Recall that the symbol|means “does not divide.”)
properties of even and odd integers that are listed in
Example 4.2.3.) H27. For all integers m and n, if m+n is even then m and
n are both even or m and n are both odd.
17. For all integers a , if a mod 6=3, then a mod 3≠2. 28. For all integers m and n, ifmn is even then m is even
or n is even.
18. Fill in the blanks in the following proof by contraposition
29. For all integers a,b, and c, if a|b and a X c, then a
that for all integers n, if 5 χ n 22 then 5 χ n.
X (b+c).(Hint: To prove p →q ∨r, it suffices to prove
Proof (by contraposition): [The contrapositive is: For all
either p ∧∼ q →r or p ∧∼ r →q. See exercise 14 in
integers n, if 5|n then5|n2.] Suppose n is any integer such that
Section 2.2.)
(a) . [We must show that (b) .] By definition of divisibility, n
= (c) for some integer k. By substitution, n2 = (d) =5(5 k 2). But
30.The following “proof” that every integer is rational is
5k 2 is an integer because it is a product of integers. incorrect. Find the mistake.
Hence n2 =5·(an integer), and so (e) [as was to be shown]. “Proof (by contradiction): Suppose not. Suppose every
integer is irrational. Then the integer 1 is irrational. But
Prove the statements in 19 and 20 by contraposition.
1=1/1, which is rational. This is a contradiction.Use[Hence
the sieve of Eratosthenes to find all prime numbers less
the supposition is false and the theorem is true.]”
than 100. 34. Use the test for primality and the result of
exercise 33 to determine whether the following numbers are
31. a. Prove by contraposition: For all positive prime.
integers
n,r, and s, if rs ≤n , then r ≤ √ n or s ≤ √ n.a. 9,269 b. 9,103 c. 8,623 d. 7,917
b. Prove: For all integers n > 1, if n is not prime,
then there exists a prime number p such that Hp ≤ 35.√ nUse
andproof by contradiction to show that every integer
n is divisible by p.(Hints: Use the resultgreater of part
than 11 is a sum of two composite numbers.
(a),Theorems4.3.1,4.3.3,and4.3.4,andthetransitivepropert
y of order.)
c. State the contrapositive of the result of part (b).
The results of exercise 31 provide a way to test whether
an integer is prime.
Exercise Set 4.7
Test for Primality
Given an integer n > 1, to test whether n is prime check
A calculator display shows that
to see if it is divisible by a prime number less than or
equal to its square root. If it is not divisible by any of 1414213562
√ 2=1.414213562 , and 1.414213562= .
these numbers, then it is prime. 1000000000
This suggests that √2 is a rational number, which
32.Use the test for primality to determine whether contradicts
the Theorem 4.7.1. Explain the discrepancy.
following numbers are prime or not. Example 4.2.1(h) illustrates a technique for
a. 667 b. 557 c. 527 d. 613 showing that any repeating decimal number is rational.
A calculator display shows the result of a certain
calculation as 40.72727272727. Can you be sure that the
result of the calculation is a rational number? Explain.
integers, 0≤ r 11 < 3 ,0 ≤r 2 < 3, and r 1≠ r 2. 27. Let p1 , p2 , p 3,… be a list of all prime numbers in
ascending order. Here is a table of the first six:
b. Use proof by contradiction, the quotient-
remainder theorem, division into cases, and the
result of part (a) to prove that for all integers n, if n2 P2 P3 P4 P5 P6
is divisible by 3 then n is divisible by 3. 3 5 7 11 13
c. Prove that√3 is irrational. H a. For each i =1, 2, 3, 4, 5, 6, let N i = p1 p 2··· p1+1.
Calculate N 1, N 2, N 3, N 4 , N 5, and N 6.
17. Give an example to show that if d is not prime
and n2 is divisible by d, then n need not be divisible
by d.
H18. The quotient-remainder theorem says not only that
there exist quotients and remainders but also that the b.For each i =1,2,3,4,5,6, find the smallest prime number
quotient and remainder of a division are unique. Prove the q isuch that q i divides N i.(Hint: Use the test for primality
uniqueness. That is, prove that if a and d are integers with d from exercise 31 in Section 4.6 to determine your
> 0 and if q 1 , r 1 , q2 , andr2 are integers such that answers.)
a=dq 1+ r 1 where 0 ≤ r 1< d For exercises 28 and 29, use the fact that for all integers n,
and n !=n( n−1)...3 · 2· 1.
a=dq 2+ r 2 where 0 ≤ r 2< d ,
then 28. An alternative proof of the infinitude of the prime
q 1=q 2∧r 1=r 2 . numbers begins as follows: Proof: Suppose there are only
finitely many prime numbers. Then one is the largest. Call
it p . Let M =p ! +1.We will show that there is a prime
H19. Prove that√5 is irrational.
number q such that q > p. Complete this proof.
H20. Prove that for any integer a,9 X (a 2−3).
H✶ 29.Prove that for all integers n, if n > 2 then there is a
prime number p such that n < p < n!. i :=2
if (i > 3 or i ≤0)
H✶30. Prove that if p1 , p2,...,and pn are distinct prime then z : = 1
else z :=0
numbers with p1 ,=2and n > 1,then p1 p 2·· p n+ 1 can
be written in the form 4k+3 for some integer k.
i :=3
H31a. Fermat’s last theorem says that for all integers n >
if (i ≤3 or i > 6)
2, the equation x n + y n=z n has no positive integer solution
then z :=2
(solution for which x, y, and z are positive integers). else Provez :=0
the following: If for all prime numbers p > 2, x + y p=z p
p
has no positive integer solution, then for any integer n > 2Consider the following algorithm segment:
that is not a power of 2, x n + y n=z n has no positive if x·y >0 then do y :=3·x
integer solution. x := x +1 end do
z := x·y
b. Fermat proved that there are no integers x, y, andz such
Find the in
that x 4 + y 4 =z 4. Use this result to remove the restriction value of z if prior to execution x and y have the
part (a) that n not be a power of 2. That is, prove that if n is below.
values given
a power of 2 and n > 4, then x n + y n=z n has no a. xpositive
=2, y =3 b. x =1, y =1
integer solution.
Find the values of a and e after execution of the loops in 4
For exercises 32–35 note that to show there isanda 5:
unique
object with a certain property, show that (1) there is an
object with the property and (2) if objects A and B havea :=2
the property, then A = B. for i :=1 to 2
a := a 2 + 1 a
32. Prove that there exists a unique prime numbernext i
of the
e :=0 f :=2
form n2 −1, where n is an integer that is greater than or
for j :=1 to 4
equal to 2.
f := f ·j
e :=e+ 1 f
33. Prove that there exists a unique prime number of the
next j
form n2 +2n−3, where n is a positive integer.
Make a trace table to trace the action of Algorithm 4.8.1 for
34. Prove that there is at most one real number a
the input variables given in 6 and 7.
with the property that a+r =r for all real numbers r.
6. a =26,d =7 7 . a =59,d =13
(Such a number is called an additive identity.)
35. Prove that there is at most one real number b with the 8. The following algorithm segment makes change; given
property that br =r for all real numbers r. (Such a number is an amount of money A between 1c / and 99c /, it
called a multiplicative identity.) determines a breakdown of A into quarters (q), dimes(d),
nickels (n), and pennies (p).
q := A÷25
Exercise Set 4.8 A :=A mod 25
d := A÷10
Find the value of z when each of the algorithm segments in 1 A :=A mod 10
and 2 is executed. n :=A÷5
p := A mod5 q=⌊ a/d ⌋∧r =a−⌊ a/d ⌋ · d .
a. Trace this algorithm segment for A =69.
b.Trace this algorithm segment for A =87. b. In a computer language with a built-in-floor function, div
and mod can be calculated as follows:
Find the greatest common divisor of each of the pairs of
integers in 9–12. (Use any method you wish.) a÷d=⌊ a /d ⌋∧a mod d=a−⌊ a/d ⌋ · d .
9. 27 and 72 10. 5 and 9
11. 7 and 21 12. 48 and 54 Rewrite the steps of Algorithm 4.8.2 for a computer
language with a built-in floor function but without div
Use the Euclidean algorithm to hand-calculate the and greatest
mod.
common divisors of each of the pairs of integers in 13–16.
13. 1,188 and 385 14. 509 and 1,177
24. An alternative to the Euclidean algorithm uses
15. 832 and 10,933 16. 4,131 andsubtraction
2,431 rather than division to compute greatest common
divisors. (After all, division is repeated subtraction.) It is
Make a trace table to trace the action of Algorithm
based on 4.8.2
the following lemma: Lemma 4.8.3
for the input variables given in 17 and 18.
17. 1,001 and 871 18. 5,859 andIf1,232
a ≥ b>0 , t hen gcd (a , b)=gcd (b , a−b) .
25. Find
a. lcm(12, 18) b. lcm(22·3·5, 23·32)
c. lcm(2800, 6125)