login
A394143
G.f. A(x) satisfies A(x)^4-3*A(x)^3+(3-x)*A(x)^2-A(x)-x^2+x=0.
3
0, 1, 2, 8, 39, 210, 1203, 7192, 44362, 280250, 1804104, 11792186, 78052758, 522114602, 3524075051, 23970980364, 164154325319, 1130807642570, 7830693456708, 54480359509912, 380626675444910, 2669315423325620, 18784031743471065, 132596873090317300
OFFSET
0,3
COMMENTS
Number of n-vertex planar rooted trees with vertices colored red, blue, and green with red root where red vertices can be followed by blue or green vertices, blue vertices can be followed by 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 A394143(n):
A = [[1, 1, 0], [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[0][n - 1]
CROSSREFS
Sequence in context: A394118 A394128 A394134 * A366049 A218321 A236339
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved