A sequence has its first term equal to 4 and each term of the sequence is obtained by adding 2 to the previous term. If f(n) represents the nth term of the sequence, which of the following recursive functions best defines this sequence? (1 point) f(1) = 2 and f(n) = f(n - 1) + 4; n > 1 f(1) = 4 and f(n) = f(n - 1) + 2n; n > 1 f(1) = 2 and f(n) = f(n - 1) + 4n; n > 1 f(1) = 4 and f(n) = f(n - 1) + 2; n > 1
Only the last line matches the description.
Sweet! Thanks! Can you explain, please. I don't understand recursive functions at all.
Recursion means finding the next term from one or more of the prior terms. You need to know the first term f(1) and how the following terms are built from it. Here, f(1) = 4 we are told. Next, we know that f(2) = f(1) + 2 = 4 + 2 = 6 and f(3) is 2 more than f(2) so f(3) = f(2)+2 = 6+2 = 8 in general here f(n) = f(n-1) +2 so f(n) - f(n-1) = 2 is just another way of writing that last line and the only choice in the question that fits this is D, the last one.
Great. I understand much better now. :)
I'm delighted.
Join our real-time social learning platform and learn together with your friends!