Problem: (Putnam) Let $a_1, a_2, \ldots, a_{3 k+1}$ be an arrangement of the numbers $1,2, \ldots, 3 k+1$. Let
$
s_i=a_1+a_2+\cdots+a_i
$
for $1 \leq i \leq 3 k+1$. How many arrangements have the property that none of the $s_i$ are divisible by 3?
Solution: We ask the highly logical question: when is it the case that $3 \mid s_{i}$ for an arrangement $a_1, a_2, \ldots, a_{3 k+1}$? If $3 \mid a_{1}$, this is certainly a case where $3 \mid s_{i}$ for some $i$ ($i = 1$). Otherwise, if $3 \nmid s_{i}$ for all $i \in \{ 1,2,\dots,k \}$ then we can also have a violation if $s_{k} + a_{k+1} \equiv 0 \pmod 3$ as $s_{k+1} = s_{k} + a_{k+1}$. So, we learn that if none of the $s_{i}$ are divisible by $3$ then $a_{1} \not\equiv 0 \pmod 3$, and as long as $s_{i}$ is not divisible by $3$, we conclude that $s_{i+1} = s_{i} + a_{i+1}$ is not divisible by $3$ only when $s_{i} + a_{i+1} \not\equiv 0 \pmod 3$. Let $\alpha$ denote the sequence of length $3k+1$ where $\alpha_{i}$ is the remainder $a_{i}$ taken modulo $3$. At this point, notice that there are $k+1$ $1