Number of words w where each letter of the n-ary alphabet occurs 3 times and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.
a(n) = Sum_{m>=1} b_{n,m} if n>0. Here, b_{n,m} satisfies b_{n,m}=(2*n+m-2)*Sum_{k=1..m} b_{n-1,k} for n>=2 and 1<=m<=n with initial conditions b_{n,m}=0 for n<m and b_{1,1}=1. - Michael Fuchs, Aug 05 2020