Problem

Source: XI International Festival of Young Mathematicians Sozopol 2022, Theme for 11-12 grade

Tags: number theory



Let $D$ be an infinite in both sides sequence of $0$s and $1$s. For each positive integer $n$ we denote with $a_n$ the number of different subsequences of $0$s and $1$s in $D$ of length $n$. Does there exist a sequence $D$ for which for each $n\geq 22$ the number $a_n$ is equal to the $n$-th prime number?