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.

494 ANSWERS TO EXERCISES<br />

3.21 If 10” < 2M < lo”+‘, there are exactly n+ 1 such powers of 2, because<br />

there’s exactly one n-digit power of 2 <strong>for</strong> each n. There<strong>for</strong>e the answer is<br />

1 + LMlog2J.<br />

Note: The number of powers of 2 with leading digit 1 is more difficult,<br />

when 1> 1; it’s ,YOsncM([nlog2-log11 - Lnlog2-log(l+l)]).<br />

3.22 All terms are the same <strong>for</strong> n and n-l except the kth, where n = 2kP1 q<br />

and q is odd; we have S, = S,-1 + 1 and T, = T,-j + 2kq. Hence S, = n<br />

and T,, =n(n+ 1).<br />

3 . 2 3 Xn=m tl im(m-l)

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

Saved successfully!

Ooh no, something went wrong!