Question: 4. (Induction/Recursion - 36 pt.) a. (5 pt.) Give a recursive definition of the sequence ana = n?, n=1,2,3,.. b. (13 pt.) Let fr be

4. (Induction/Recursion - 36 pt.) a. (5 pt.) Give a recursive definition of the sequence ana = n?, n=1,2,3,.. b. (13 pt.) Let fr be the nth Fibonacci number (fo = 0,f1 = 1, fn = fn-1 + fn-2 ). Prove that fi + f3 + ... + f2n-1 = fan when n is a positive integer using induction. C. (18 pts.) Write an iterative method and a recursive method for computing 1 + 2 + 3 + ... + n for a positive integer n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
