help
A recursive function is shown below: f(1) = 4 and f(n) = f(n - 1) - 8; n > 1 Which of the following lists the terms in the sequence defined by this recursive function? 4, -4, -12, -20, -28, ... 4, 4, 12, 20, 28, ... 4, 12, 20, 28, 36, ... 4, -12, -20, -28, -36, ...
f(2) = f(2-1)-8 = f(1) - 8 = -4 f(3) = f(3-1)-8 = f(2) - 8 = -4 - 8 = -12
Do you see how?
no explain mor3 @lokeshh
oh wait yes so the answer would be what? > that is why i am not understanding.
Let's first calculate f(2). We use this formula: f(n) = f(n - 1) - 8; n > 1 In this formula we substitute n to 2, then we have f(2) = f(2 - 1) - 8 = f(1) -8 Now since we know f(1) = 2, this gives us f(2) = 4 - 8 = -4 Do you understand how I computed f(2)?
yes
i got a
@lokeshh
Now can you calculate f(3) by substituting n = 3?
i got a
You meant you got it?
yes i do for the answer i believe its a :)
Yeah, that's the correct answer. You can further check by calculating f(3) and f(4). They will be -12 and -20 respectively.
ok XOXO thank you :D
Join our real-time social learning platform and learn together with your friends!