login
A394127
G.f. A(x) satisfies A(x)^3+(x-2)*A(x)^2+(1-x)*A(x)+x^2-x=0.
1
0, 1, 2, 8, 38, 198, 1096, 6330, 37722, 230248, 1432230, 9046382, 57865712, 374084722, 2440256850, 16042605800, 106181903430, 706975917526, 4731960602456, 31820872887146, 214885891901898, 1456631639356008, 9907950315975622, 67604709705143518, 462607860107453920
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 red or blue vertices, blue vertices can be followed by red or green vertices, and green vertices can only occur as leaves.
LINKS
S. Dimitrov, N. Fox, K. Hadaway, A. Tharp, and S. Wagner, Counting Colored Trees, arXiv:2602.16055 [math.CO], 2026.
FORMULA
a(n) ~ (3 + 7/(4*cos(Pi/7)-3))^(n - 1/2) / (sqrt(Pi) * n^(3/2) * 2^(n + 1/2)). - Vaclav Kotesovec, Jun 04 2026
PROG
(Python)
def A394127(n):
A = [[1, 1, 0], [1, 0, 1], [0, 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: A271934 A364723 A372107 * A266797 A369208 A234939
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved