login
A394115
G.f. A(x) satisfies A(x)^3+(2x-2)*A(x)^2+(1-x)*A(x)+x^2-x=0.
1
0, 1, 2, 7, 29, 132, 639, 3230, 16855, 90121, 491197, 2719051, 15245058, 86396108, 494101906, 2848033464, 16528607591, 96500097652, 566395507497, 3340116683850, 19780686390699, 117592135034870, 701482912853093, 4197815714462468, 25193001701058114
OFFSET
0,3
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 green vertices, blue vertices can only be followed by red vertices, and green vertices can be followed by blue or green vertices.
Appears that the inverse binomial transform starting from index n=2 yields sequence A217596.
Appears that the inversion starting from index n=1 yields sequence A006026.
LINKS
S. Dimitrov, N. Fox, K. Hadaway, A. Tharp, and S. Wagner, Counting Colored Trees, arXiv:2602.16055 [math.CO], 2026.
FORMULA
a(n) ~ 2^(5*n-4) / (3*sqrt(Pi) * n^(3/2) * 5^(n - 3/2)). - Vaclav Kotesovec, Jun 04 2026
PROG
(Python)
def A394115(n):
A = [[0, 0, 1], [1, 0, 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[2][n - 1]
CROSSREFS
Sequence in context: A232971 A366084 A368935 * A110576 A074600 A064641
KEYWORD
nonn,changed
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved