Problem

Source: Thailand 2023 TSTST1/5

Tags: combinatorics



Let $n>1$ be a positive integer. Find the number of binary strings $(a_1, a_2, \ldots, a_n)$, such that the number of indices $1\leq i \leq n-1$ such that $a_i=a_{i+1}=0$ is equal to the number of indices $1 \leq i \leq n-1$, such that $a_i=a_{i+1}=1$.