login
A394144
G.f. A(x) satisfies (1-x)*A(x)^4+x*A(x)^3+(4x^2-2x)*A(x)^2+x^2*A(x)+x^3=0.
3
0, 1, 2, 7, 31, 157, 864, 5024, 30370, 188941, 1201771, 7779443, 51083531, 339437226, 2278112737, 15420424861, 105152580575, 721670737533, 4981038781815, 34552941731249, 240769486524417, 1684502378190617, 11828416221973412, 83333705758153522, 588880900214492672
OFFSET
0,3
COMMENTS
Number of n-vertex planar rooted trees with vertices colored red, blue, and green with blue 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 A394144(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[1][n - 1]
CROSSREFS
Sequence in context: A394132 A030873 A030913 * A181066 A325452 A030945
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 11 2026
STATUS
approved