login
A394126
G.f. A(x) satisfies A(x)^6-3*A(x)^5+(x+3)*A(x)^4-(4x+1)*A(x)^3+4x*A(x)^2-x*A(x)+x^2=0.
2
0, 1, 3, 14, 77, 464, 2968, 19806, 136407, 962618, 6925550, 50611024, 374661606, 2803693956, 21174556020, 161187646856, 1235473430325, 9526917196888, 73855947802228, 575279950326078, 4500074754843640, 35336594070610722, 278443821633875298, 2201014965056842878
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 color, and green vertices can only be followed by 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 A394126(n):
A = [[0, 1, 0], [1, 1, 1], [0, 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
Cf. A394125.
Sequence in context: A394120 A048779 A369477 * A394138 A393906 A052186
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved