In Exercise T, we are looking for number of triangles on $3\times n$ grid.
This problem is about quadrilaterals instead of triangles.
$a(n)$ is the number of simple quadrilaterals on $3\times n$ grid. $b(n)$ is the number of convex quadrilaterals on $3\times n$ grid.
Clearly, $a(1)=b(1)=0$ and $a(2)=b(2)=9$.
Find $a(n)$ and $b(n)$.