login
A394161
G.f. A(x) satisfies A(x)^5-3x*A(x)^3+2x^2*A(x)^2+x^2*A(x)-x^3=0.
3
0, 1, 1, 4, 22, 139, 951, 6855, 51272, 394204, 3096234, 24736726, 200395374, 1642308158, 13591395172, 113424043732, 953433146448, 8065360983795, 68608905310365, 586529022954170, 5036433199693944, 43419795094441061, 375679865662904821, 3261148423057895137
OFFSET
0,4
COMMENTS
Number of n-vertex planar rooted trees with vertices colored red, blue, and green with green root where red vertices can be followed by vertices of any colors, blue vertices can be followed red or green vertices, and green vertices can only be followed by red 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 A394161(n):
A = [[1, 1, 1], [1, 0, 1], [1, 0, 0]]
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[2][n - 1]
CROSSREFS
Sequence in context: A188686 A025756 A366119 * A200731 A193116 A187254
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 12 2026
STATUS
approved