Problem

Source: Dürer Competition Finals 2023/E+ 3 (modified)

Tags: combinatorics, Sequence



$a_1,a_2,\dots,a_k$ and $b_1,b_2,\dots,a_n$ are integer sequences with $a_1=b_1=0$, $a_k=26,b_n=25$, and $k+n=23$. It is known that $a_{i+1}-a_i=2\enspace\text{or}\enspace3$ and $b_{j+1}-b_j=2\enspace\text{or}\enspace3$ for all applicable $i$ and $j$, and the numbers $a_2,\dots,a_k,b_2,\dots,b_n$ are pairwise different. Determine the total number of such pairs of sequences.