I have found a question in my book and I have solve it, but I am not sure about the answer.
The question goes like this:
Find a recursive formula that will give the number of ways to order $N$ ice cream balls of two types, Chocolate and Vanilla when 3 balls of Vanilla can't be ordered in a row.
The Answer:
$$f(n) =f(n-1)+f(n-2)+f(n-3)$$ $$f(1)=2 $$ $$f(2) = 4$$ $$f(3) = 7$$
Yes, your answer is good.
A row of $N$ balls can be finished either by
So You can obtain all rows of $N$ balls either by
So you obtain your answer.