In the following assignments be sure to include an error case if it is necessary. In addition, explore your results to answer the questions. In the following formulas, _() denotes a subscript. So a_1 is a with a subscript of 1. And a_(n-1) is a with a subscript of n-1. First write a program to compute the value of the following recursive formula: a_1 = 23 a_n = ( a_(n-1) - 22 ) * 2 + 21 Questions: What is the value of a(20)? a(21)? Is there a distinguishable pattern to the results? Change your results so that a_1 is 22 instead of 23. Is there a distinguishable pattern to the results? -------- The golden ratio is defined as: phi = 1 + 1 / phi It came about as a notion of adding two lengths of rope and ratios. For example, if a+b is to a as a is to b then the ration of a+b/a or of a/b is the golden ration phi. This recursive function converges in the limit to the golden ratio. As an exercise, we are going to define the golden ratio as having a stopping condition and a value n for how deep we want to estimate the value. (Note that the true value is 1.618033988749...) To compute n iterations of phi, we can write: phi_0 = 1 phi_n = 1+1/phi_(n-1) So phi_1 = 1 + 1/1 = 2; phi_2 = 1 + 1/2 = 1.5; phi_3 = 1 + 1/1.5 = 1.666667; phi_4 = 1 + 1/1.666667 = 1.6 And so on... What value of n estimates the golden ratio to 5 digits after the decimal? How accurate is phi(100)? Note that this answer may change depending on the types you used for your variables. What happens if we change our initial guess (phi_0) to -1? What happens if we change it to -.99? How about 1.6?