Exercises 12—15 refer to the following algorithm segment. For each positive integer n, let
end while
14. a. Use iteration to guess an explicit formula for
b. Prove that if k is an integer and x is a real number with
c. Prove that for every integer
d. Prove the correctness of the formula you found in part (a).
(a)
Use iteration to guess an explicit formula for
Given information:
For each positive integer n, let bn be the number of iterations of the while loop. while ( n > 0)
n
end whileCalculation:
Result previous exercise:
Let us determine the first terms of the given recurrence relation:
(b)
Prove that if k is an integer and x is a real number with
(c)
Prove that for all integers
(d)
Prove the correctness of the formula you found in part (a).