Math|MATH 120|Trinity Western University
Consider the sequences (rn) and (sn) defined recursively by r0 = 1, s0 = 0, and rn+1 = rn/2, sn+1 = sn + rn+1 for n ≥ 0. (a) What are the formulas for the nth terms rn and sn of these sequences? (b) What is the floating point binary representation of sn? (c) Write a MATLAB program which generates the sequences (rn) and (sn) recursively, and run it on your computer until the computed values satisfy sn+1 = sn. To do this you can use a for loop with a break statement. Display the sequence of values of n and sn in two columns. (d) What does this tell you about the storage of real numbers in your computer (assuming it uses binary representation)?