Problem

Source: 2022 IMOC C5

Tags: combinatorics, IMOC



Define a "ternary sequence" is a sequence that every number is $0,1$ or $2$. ternary sequence $(x_1,x_2,x_3,\cdots,x_n)$, define its difference to be $$(|x_1-x_2|,|x_2-x_3|,\cdots,|x_{n-1}-x_n|)$$A difference will make the length of the sequence decrease by $1$, so we define the "feature value" of a ternary sequence with length $n$ is the number left after $n-1$ differences. How many ternary sequences has length $2023$ and feature value $0$? Proposed by CSJL