
David W. answered 09/22/15
Tutor
4.7
(90)
Experienced Prof
The function, an = 2an-1 - an-2, defines the nth value in the sequence as a function of the two previous values. So, the value of a0 and a1 are defined at the beginning and the function is valid only for n>1.
Note that there are two methods for defining the possible values of n: (1) start with n=0, and (2) start with n=1. You will find both methods used very often.
In order to find the value for any an, the two previous an values are used. That means that you may have to find all of the an values from a2 up to an-1 in order to evaluate the function to get an.
Thus, a recursive function has:
(1) a base case
(2) a recursive case
Part a:
a0 = 1 (base case)
a1 = 1 (base case)
a2 = 2a1 - a0 = 2(1) - 1 = 1 (recursive case)
a3 = 2a2 - a1 = 2(1) - 1 = 1 (recursive case)
Part b:
a0 = 0 (base case)
a1 = 0 (base case)
a2 = 2a1 - a0 = 2(0) - 0 = 0 (recursive case)
a3 = 2a2 - a1 = 2(0) - 0 = 0 (recursive case)