09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A ANSWERS TO EXERCISES 505<br />

4.45 x2 E x (mod 10n) ( x(x - 1) E 0 (mod 2”) and x(x - 1) E 0<br />

(mod 5n) M x mod 2” = [Oor 11 and x mod 5” = [Oor 11. (The last step<br />

is justified because x(x - 1) mod 5 = 0 implies that either x or x - 1 is a<br />

multiple of 5, in which case the other factor is relatively prime to 5n and can<br />

be divided from the congruence.)<br />

So there are ,at most four solutions, of which two (x = 0 and x = 1)<br />

don’t qualify <strong>for</strong> the title “n-digit number” unless n = 1. The other two<br />

solutions have the <strong>for</strong>ms x and 1 On + 1 -- x, and at least one of these numbers<br />

is > 1 On-‘. When n = 4 the other solution, 10001 - 9376 = 625, is not a<br />

four-digit number. 1Ne expect to get two n-digit solutions <strong>for</strong> about 90% of<br />

all n, but this conjecture has not been proved.<br />

(Such self-reproducing numbers have been called “automorphic.“)<br />

4.46 (a) If j’j - k’k = gcd(j,k), we have nk’knscdii,k) = ni’i = 1 and<br />

nk’k - 1. (b) L e tn<br />

= pq, where p is the smallest prime divisor of n. If<br />

2” E 1 (mod n) then 2” G 1 (mod p). Also 2P-l = 1 (mod p); hence<br />

2scdipm ‘,nl = 1 (mod p). But gcd(p - 1 In) = 1 by the definition of p.<br />

4.47 If n+’ = 1 (mod m) we must have n I m. If nk = nj <strong>for</strong> some<br />

1 < j < k < m, then nkPj = 1 because we can divide by nj. There<strong>for</strong>e if the<br />

numbers n’ mod m, . , n”-’ mod m are not distinct, there is a k < m - 1<br />

with nk = 1. The least such k divides m- 1, by exercise 46(a). But then kq =<br />

(m - 1 )/p <strong>for</strong> some prime p and some positive integer q; this is impossible,<br />

since nkq $ 1. There<strong>for</strong>e the numbers n’ mod m, . . , nmP’ mod m are<br />

distinct and relatively prime to m. There<strong>for</strong>e the numbers 1, . , m - 1 are<br />

relatively prime to n-L, and m must be prime.<br />

4.48 By pairing numbers up with their inverses, we can reduce the product<br />

(mod m) to n l~n 2); otherwise it’s +l.<br />

4.49 (a) Either m < n (@(N - 1) cases) or m = n (one case) or m > n<br />

(O(N - 1) again). Hence R(N) = 2@(N - 1) + 1. (b) From (4.62) we get<br />

2@(N-l)+l = l+x~(d)LN/d]LN/d-11;<br />

d>l<br />

hence the stated result holds if and only if<br />

x p(d) LN/dJ = 1 ,<br />

d2’<br />

<strong>for</strong> N :z 1<br />

And this is a special case of (4.61) if we set f(x) = (x 3 1)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!