183k views
4 votes
Generate the first 5 terms of this sequence:

f(1) = 0 and f(2) = 1, f(n) = f(n - 1) + f(n - 2), for n > 2.

A. 0, -1, 1, 0, 2

B. 0, 1, 1, 2, 3

C. 0, 1, 2, 2, 3

D. 0, 1, 1, 2, 2

Please helppp! Thanks! <3,

User Goku
by
6.4k points

1 Answer

3 votes
We are given f(1) = 0 and f(2) = 1. Going forward, the term is the sum of the two previous terms. f(3) = f(2) + f(1) = 0 + 1 = 1. f(4) = f(3) + f(2) = 1 + 1 = 2 f(5) = f(4) + f(3) = 2 + 1 = 3 This matches answer B.
User Scymex
by
6.6k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.