207k views
4 votes
F(n) = f(n – 1) + f(n – 2); f(1) = 2; f(2) = 1.

Find the 12th term.

1 Answer

5 votes

Answer: 199

========================================================

Step-by-step explanation:

In a prior answer, I mentioned how f(n) = f(n-1)+f(n-2) basically means "add the two terms prior to the nth term to get the nth term"

Let's use this idea to compute the third term:

Plug in n = 3

f(n) = f(n-1)+f(n-2)

f(3) = f(3-1)+f(3-2)

f(3) = f(2)+f(1)

f(3) = 1+2

f(3) = 3

Now plug in n = 4 to get the fourth term

f(n) = f(n-1)+f(n-2)

f(4) = f(4-1)+f(4-2)

f(4) = f(3)+f(2)

f(4) = 3+1

f(4) = 4

Repeat for n = 5. This process keeps going until we hit n = 12

f(n) = f(n-1)+f(n-2)

f(5) = f(5-1)+f(5-2)

f(5) = f(4)+f(3)

f(5) = 4+3

f(5) = 7

Plug in n = 6

f(n) = f(n-1)+f(n-2)

f(6) = f(6-1)+f(6-2)

f(6) = f(5)+f(4)

f(6) = 7+4

f(6) = 11

Plug in n = 7

f(n) = f(n-1)+f(n-2)

f(7) = f(7-1)+f(7-2)

f(7) = f(6)+f(5)

f(7) = 11+7

f(7) = 18

Plug in n = 8

f(n) = f(n-1)+f(n-2)

f(8) = f(8-1)+f(8-2)

f(8) = f(7)+f(6)

f(8) = 18+11

f(8) = 29

Plug in n = 9

f(n) = f(n-1)+f(n-2)

f(9) = f(9-1)+f(9-2)

f(9) = f(8)+f(7)

f(9) = 29+18

f(9) = 47

Plug in n = 10

f(n) = f(n-1)+f(n-2)

f(10) = f(10-1)+f(10-2)

f(10) = f(9)+f(8)

f(10) = 47+29

f(10) = 76

Plug in n = 11

f(n) = f(n-1)+f(n-2)

f(11) = f(11-1)+f(11-2)

f(11) = f(10)+f(9)

f(11) = 76+47

f(11) = 123

Plug in n = 12

f(n) = f(n-1)+f(n-2)

f(12) = f(12-1)+f(12-2)

f(12) = f(11)+f(10)

f(12) = 123+76

f(12) = 199

As you can see, it's a bit of work. Recursive sequences can be unwieldy.

User Todd Davis
by
8.6k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.