MathDB
I have 0 feature :(

Source: 2022 IMOC C5

September 6, 2022
combinatoricsIMOC

Problem Statement

Define a "ternary sequence" is a sequence that every number is 0,10,1 or 22. ternary sequence (x1,x2,x3,,xn)(x_1,x_2,x_3,\cdots,x_n), define its difference to be (x1x2,x2x3,,xn1xn)(|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 11, so we define the "feature value" of a ternary sequence with length nn is the number left after n1n-1 differences. How many ternary sequences has length 20232023 and feature value 00?
Proposed by CSJL