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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A ANSWERS TO EXERCISES 531<br />

6.49 Set z = i in (6.146); the partial quotients are 0, 2F3, 2F1, 2Fl, . .<br />

(Knuth [172] noted that this number is transcendental.)<br />

6.50 (a) f(n) is even tl 3\n. (b) If the binary representation of n is<br />

(la'o"z... lam ‘o”m )2, where m is even, we have f(n) = K(a’,az,. ,a, ‘).<br />

6.51 (a) Combinatorial proof: The arrangements of {l ,2,. . , p} into k subsets<br />

or cycles are divided into “orbits” of 1 or p arrangements each, if we<br />

add 1 to each element modulo p. For example,<br />

{1,2,4I'J{3,51 + {2,3,5IuI4,11 + 13,4,lIu{5,21<br />

--f 14,5,2P~u,31 + 15,1,31w2,41 + 11,2,41~{3,51.<br />

We get an orbit of size 1 only when this trans<strong>for</strong>mation takes an arrangement<br />

into itself; but then k = 1 or k = p. Alternatively, there’s an algebraic proof:<br />

WehavexP-xfl-+xLandxE=xP-x (mod p), since Fermat’s theorem tells<br />

us that x” -x is divisible by (x-0)(x - 1). . . (x - (p-l)).<br />

(b) This result follows from (a) and Wilson’s theorem; or we can use<br />

xp-’ E xF/(x-1) - l(XP -x)/(x- 1) =xp ' +xp-2 + . ..+x.<br />

(c) We have {“l’} E [“:‘I z 0 <strong>for</strong> 3 6 k 6 p, then {“12} E [pl’] G 0<br />

<strong>for</strong> 4 < k < p, etc. (Similarly, we have [‘PpP’] s -{2ppm’} E 1.)<br />

(d) p! =pP= tk(-l)pPkpk[;] =pP[~]-pP~'[pp,]+...+p3[~]~<br />

P'[;] +P[$ But P[:] = P!, so<br />

[I] = P[I] --P$] +...+ppyP]<br />

is a multiple of p2. (This is called Wolstenholme’s theorem.)<br />

6.52 (a) Observe that H, = Hk + HlnlP~/p, where Hz = xc=,(k I p)/k.<br />

(b) Working mod 5 we have H, = (0, 1,4,1,0) <strong>for</strong> 0 < r < 4. Thus the first<br />

solution is n = 4. By part (a) we know that 5\a, =$ 5\ajn,sl; so the next<br />

possible range is n == 20 + r, 0 < r 6 4, when we have H, = Ht + &H4 =<br />

H;e+~Hq+H,+~~=, 20/k(20+k). The numerator of H;,, like the numerator<br />

of HJ, is divisible by 25. Hence the only solutions in this range are n = 20<br />

and n = 24. The next possible range is n = 100 + r; now H, = H; + &Hzo,<br />

which is ;Hzo + H, plus a fraction whose numerator is a multiple of 5. If<br />

$Hzo % m (mod 5), where m is an integer, the harmonic number H’~o+~ will<br />

have a numerator divisible by 5 if and only if m + H, e 0 (mod 5); hence<br />

m must be E 0, 1, or 4. Working modulo 5 we find $Hls = &Hz0 + &H4 3<br />

-&Hh = & E 3; hence there are no solutions <strong>for</strong> 100 6 n < 104. Similarly<br />

there are none <strong>for</strong> 120 < n 6 124; we have found all three solutions.<br />

(By exercise 6.51(d), we always have p2\apP,, p\apzPp, and p\a,r-,,<br />

if p is any prime 3 5. The argument just given shows that these are the only

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

Saved successfully!

Ooh no, something went wrong!