# Good Order

Author: mathforces
Problem has been solved: 3 times

Русский язык | English Language

Let's call a sequence $\{x_n\}_{n \geq 0}$ of numbers from the set $\{0,1, ..., 16 \}$ to be good of order $k$, if there are $c_0,c_1,...,c_{k-1} \in \{0,1,...,16\}$, $c_0 \neq 0$ such that $x_{i+k}=c_{k-1}x_{i+k-1}+...+c_{1}x_{i+1}+c_{0}x_{i} \text{ mod } 17$ for all $i \geq 0$. Find the number of distinct good sequences of order at most $3$.