login
A394139
G.f. A(x) satisfies (x-1)*A(x)^4+(-2x^2+3x-1)*A(x)^3+(-2x^2+3x)*A(x)^2-3x^2*A(x)+x^3=0.
2
0, 1, 1, 2, 7, 34, 194, 1208, 7947, 54318, 381918, 2744560, 20068358, 148829716, 1116773044, 8463323632, 64683640051, 497999144726, 3858699223862, 30067745845088, 235468907374386, 1852285897565836, 14629457346782604, 115964861319175536, 922269694511198782
OFFSET
0,4
COMMENTS
Number of n-vertex planar rooted trees with vertices colored red, blue, and green with green 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 red vertices.
Appears that sequence A244062 gives the coefficients on -1/A(x), where A(x) is the generating function for this sequence.
LINKS
S. Dimitrov, N. Fox, K. Hadaway, A. Tharp, and S. Wagner, Counting Colored Trees, arXiv:2602.16055 [math.CO], 2026.
PROG
(Python)
def A394139(n):
A = [[0, 1, 0], [1, 1, 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[2][n - 1]
CROSSREFS
Sequence in context: A206240 A289720 A190631 * A326560 A199475 A241599
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved