Albert has a sequence defined by \begin{align*}a_0 &= a_1 = a_2 = 0 \\ a_3 &= 1 \\ a_n &= 3 a_{n-2} - a_{n-4}.\end{align*} Find $a_{31}$.