# Difference between revisions of "2019 AMC 12B Problems/Problem 23"

## Solution

We can deduce that any valid sequence of length $n$ wil start with a 0 followed by either "10" or "110". Because of this, we can define a recursive function:

$f(n) = f(n-3) + f(n-2)$

This is because for any valid sequence of length $n$, you can remove either the last two numbers ("10") or the last three numbers ("110") and the sequence would still satisfy the given conditions.

Since f(5) = 1 and f(6) = 2, you follow the recursion up until $f(19) = 65 \quad \boxed{C}$

-Solution by MagentaCobra