OEIS A078008, the coefficients of the generating function $\frac{1-x}{(1+x)(1-2x)}$, gives the number of walks of length $n$ on a triangle that return to the original vertex.
For fixed $n$, is there an efficient algorithm for sampling uniformly over the distribution of all walks of length $n$?
Say that the vertices of the triangle are $A$, $B$, and $C$.
We will sample a uniformly random $A$-to-$A$ walk of length $n$ if we choose every step with probability proportional to the number of walks that end at $A$ after $n$ steps, and which take that step. So, for example, if we're at vertex $B$ and we want to end up at $A$ after $3$ more steps, then we should go to $A$ with probability $\frac23$ and to $C$ with probability $\frac13$. That's because we want to choose uniformly from the walks $BABA$, $BACA$, and $BCBA$; $2$ of those walks go to $A$ next, and $1$ goes to $C$ next.
To implement this, we need to know the number of walks of each type. In closed form, the $n^{\text{th}}$ term of A078008 is $\frac{2^n + 2(-1)^n}{3}$. That's the number of walks of length $n$ starting at $A$ and ending at $A$. Accordingly, out of the $2^n$ total walks of length $n$, there are $\frac{2^n - (-1)^n}{3}$ that start at $A$ and end at $B$, and the same time for any other pair of distinct vertices.
So, the rule we end up following is this:
Here's a sample of this algorithm: say we want to sample a random length-$6$ walk.