Class assignment problem

how does this question form a pattern of Fibonacci please explain through example did not understand this.

In this question, you have to find total number of n digit integer which can be formed using “a” and “b” such that two b’s can never be in adjacent position. So let say 1st digit is “a” then next digit can be “a” or “b”, so total no. of n digit integers formed after fixing first digit as “a” is total no. of (n-1) digit integer formed using “a” and “b”.
Similarly if you fix 1st digit as “b” then next digit must be “a”, so total no. of n digit integer formed after fixing first digit as “b” is total no. of (n-2) digit integer formed using “a” and “b”

Thus ans(n) = ans(n-1) + ans(n-2); which seems like fibonacci series with ans(1)=2 and ans(2)=3;

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.