login
A394116
G.f. A(x) satisfies A(x)^5-(2x+3)*A(x)^4+(7x+1)*A(x)^3-(4x^2+3x)*A(x)^2+3x^2*A(x)-x^3=0.
3
0, 1, 1, 3, 13, 66, 364, 2111, 12664, 77853, 487589, 3098863, 19930627, 129458464, 847941004, 5593838322, 37132420061, 247835922698, 1662152295702, 11195577583449, 75700837876997, 513654611900204, 3496381454815240, 23868386315806536, 163372487283786302
OFFSET
0,4
COMMENTS
Number of n-vertex planar rooted trees with vertices colored red, blue, and green with red 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 A394116(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[0][n - 1]
CROSSREFS
Sequence in context: A156181 A260783 A373932 * A228987 A394145 A112807
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved