The generating function for the alternating sequence of 1's and 0's is composed by taking $(e^x +e^{-x})/2$.
This approach does not work for when we want the alternation to be based on $mod$ $3$. For ordinary generating functions, the general form of an equation for a sequence which is periodically 1 taken $ mod$ $n$ would be $ (1-x^{n})^{-1} $. We cannot do the same for exponential generating functions.
I have considered the triangular numbers, since those are naturally done $ mod $ $3$, but once again I failed to appropriate it to building a decent analytic generating function.