i’m unable to understand the question. please explain
The question is not clear
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;