login
A394133
G.f. A(x) satisfies A(x)^5-2*A(x)^4+(4x+1)*A(x)^3-(3x^2+3x)*A(x)^2+(x^3+3x^2)*A(x)-x^3=0.
3
0, 1, 1, 3, 12, 56, 288, 1583, 9129, 54578, 335522, 2108754, 13492814, 87615489, 575986999, 3826311988, 25646949717, 173243532072, 1178199786364, 8060658132743, 55439470986851, 383105416597112, 2658636183714792, 18520888690187382, 129471023915349560
OFFSET
0,4
COMMENTS
Number of n-vertex planar rooted trees with vertices colored red, blue, and green with blue root where red vertices can be followed by blue or green vertices, blue vertices can only be followed red vertices, 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 A394133(n):
A = [[0, 1, 1], [1, 0, 0], [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: A369482 A366097 A074533 * A000257 A301418 A224922
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved