From CMC Y3:
Let $N$ be the number of integer sequences $a_1, a_2, \dots, a_{10}$ such that for every pair $(i,j),$ where $1 \leq i < j \leq 10,$$|a_i+a_{i+1}+\dots+a_j| \leq 2.$ What is the remainder when $N$ is divided by $100$?
The only techniques I could think of doing were recursion and trying out some smaller cases. Recursion by limiting the number of terms got me nowhere, and neither did trying cases. I couldn't find a nice bijection either. Any hints as to how to start?
Also, does anyone have a link to more problems like this, or if you provide a solution (or if you don't), what you think of first when you look at this kind of problem?
A hint would be to define $s_i$ as the sum $\sum_{1 \leq j \leq i} a_j$. Thus $s_0 = 0$.
The condition then translates to $|s_j - s_i| \leq 2$, whenever $j - i \geq 2$.
In particular, starting from $i = 2$, every $s_i$ lies in $[-2, 2]$.
You can then break the problem into several cases. E.g. what if there is one $s_i$ equal to $2$? Etc.
It would be more natural if the question asks for $1 \leq i \leq j \leq 10$, which would save us the effort of dealing with $s_1$.