0

So we were working this problem in class and for f(2) I got the same answer but for f(3) I got something different from the professor.

Basis: f(0) = -1 and f(1) = 2
Recursion: f(n) = f(n-2) - f(n-1)

For f(3) I am getting 1
f(3-2) - f(3-1)
=f(1) - f(2)
=2 - f(2-2) - f(2-1)
=2 - -1 - 2
=2+1-2 = 1

But the answer he got was:

5
MeesterMarcus
  • 700
  • 1
  • 9
  • 25

1 Answers1

0
=2 - -1 - 2

This should be

= 2 - (-1-2) = 2 + 1 + 2 = 5
Femaref
  • 60,705
  • 7
  • 138
  • 176