Problem

Source: India EGMO TST 2023/5

Tags: combinatorics, Sequence, rigid



Let $k$ be a positive integer. A sequence of integers $a_1, a_2, \cdots$ is called $k$-pop if the following holds: for every $n \in \mathbb{N}$, $a_n$ is equal to the number of distinct elements in the set $\{a_1, \cdots , a_{n+k} \}$. Determine, as a function of $k$, how many $k$-pop sequences there are. Proposed by Sutanay Bhattacharya