login
A394117
G.f. A(x) satisfies A(x)^5+(2x-2)*A(x)^4+A(x)^3+(4x^2-2x)*A(x)^2+x^3=0.
3
0, 1, 2, 7, 30, 144, 744, 4049, 22906, 133537, 797404, 4855941, 30057724, 188635684, 1197865288, 7684428374, 49735550690, 324418503536, 2130770610246, 14080910729781, 93563778237028, 624781101890740, 4190678175148708, 28222633284905036, 190770359607743460
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 green vertices, blue vertices can be followed by red or blue vertices, and green vertices can be followed by blue 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 A394117(n):
A = [[0, 0, 1], [1, 1, 0], [0, 1, 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: A368932 A369160 A243632 * A394129 A196148 A390895
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved