login
A394141
G.f. A(x) satisfies A(x)^5-2*A(x)^4+(2x+1)*A(x)^3-4x*A(x)^2+x*A(x)-x^2=0.
3
0, 1, 3, 15, 89, 577, 3954, 28159, 206344, 1545851, 11787445, 91191974, 714062041, 5648777429, 45079529911, 362495811596, 2934348587956, 23892641086459, 195557929860835, 1608071398391111, 13278516834574055, 110060894070407408, 915386559028780435
OFFSET
0,3
COMMENTS
Number of n-vertex planar rooted trees with vertices colored red, blue, and green with blue root where red vertices can only be followed by blue vertices, blue vertices can be followed by vertices of any colors, and green vertices can be followed by red or green vertices.
LINKS
S. Dimitrov, N. Fox, K. Hadaway, A. Tharp, and S. Wagner, Counting Colored Trees, arXiv:2602.16055 [math.CO], 2026.
PROG
(Python)
def A394141(n):
A = [[0, 1, 0], [1, 1, 1], [1, 0, 1]]
if n == 0:
return 0
m = len(A)
output = [[1] for i in range(m)]
for l in range(2, n + 1):
for i in range(m):
term = 0
for k in range(1, l):
for j in range(m):
term += A[i][j] * output[i][k - 1] * output[j][l - k - 1]
output[i].append(term)
return output[1][n - 1]
CROSSREFS
Sequence in context: A287511 A231257 A074541 * A394153 A368974 A394131
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved