What is the cardinality of this set?
$$\{:\{1, … , \} → \{0,1,2\}\mid ∀ ∈ \{1, … , − 1\}: () + ( + 1) ≠ 4\}$$
On a logical level, I understand that it must be the set of all functions for which $f(i+1)\neq f(i) \neq 2$. But there's no formula for the function, so.. How can this be found?
Let $a_n$ be the number of such functions. We have two cases: