You count terms.
Fib(3) is the fibonacci of 3d term which is 2
but if you say before number 3 which are 2+1 then its 3.
when you say fib(3) you have to define what you mean 3d term of sequence which is the number 2 or you mean the number 3 which is the 4th term
Sonic Kondwani Mwape There is confusion because some people make a fibo sequence that the first number of it is 1, some of them make the first number 0. It is true that fibonacci starts from 0 and 0 is the first number of the sequence, not 1. That is why in a pseudo-code, the recursion of fibonacci function have a base if n is 0, return 0, else if n is 1 return 1, other than that you do recursive.
What made the confusion is also that when you do fibo (1) for example, it prints out 1 instead of 0, why is that? Because in programming (what I know), is that things starts from 0 like indexes of arrays, you can make your own code looks like if you input 1, it does fibo(input-1) and it will print out 0 instead of 1. I hope this is clear to understand.
if the fibonacci sequence is defined to start at 0, then the sequence is 0,1,1,2,3,5,8,...then fib(0)=0, fib(1)=1, fib(2)=1, fib(3)=2, and fib(4)=3. it all depends on where you start the sequence, if started a 1, instead of 0, then fib(3)=3