AIME II 2026 (Problem 14)

For integers aa and bb, let a∘b=a−ba\circ b=a-b if aa is odd and bb is even, and a+ba+b otherwise. Find the number of sequences a1,a2,a3,…,ana_1,a_2,a_3,\ldots,a_n of positive integers such that
a1+a2+a3+⋯+an=12a_1+a_2+a_3+\cdots+a_n=12
and
a1∘a2∘a3∘⋯∘an=0a_1\circ a_2\circ a_3\circ\cdots\circ a_n=0
where the operations are performed from left to right; that is, a1∘a2∘a3a_1\circ a_2\circ a_3 means (a1∘a2)∘a3(a_1\circ a_2)\circ a_3.