login
A394140
G.f. A(x) satisfies (x+1)*A(x)^5-x*A(x)^4-(2x^2+x)*A(x)^3+(2x^3+3x^2)*A(x)^2-3x^3*A(x)+x^4=0.
3
0, 1, 1, 4, 22, 138, 930, 6561, 47800, 356728, 2712758, 20944303, 163738947, 1293610671, 10312170488, 82843804507, 670045658032, 5451693184584, 44591169828366, 366447128131373, 3024200357007623, 25053501077514721, 208272200149758543, 1736864093227610857
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 blue vertices, blue vertices can be followed by vertices of any colors, 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 A394140(n):
A = [[0, 1, 0], [1, 1, 1], [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[0][n - 1]
CROSSREFS
Sequence in context: A091638 A142984 A283055 * A097593 A386553 A188686
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved