login
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

%I #6 Mar 14 2026 15:04:07

%S 0,1,2,7,31,157,864,5024,30370,188941,1201771,7779443,51083531,

%T 339437226,2278112737,15420424861,105152580575,721670737533,

%U 4981038781815,34552941731249,240769486524417,1684502378190617,11828416221973412,83333705758153522,588880900214492672

%N 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.

%C 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.

%H Nathan Fox, <a href="/A394144/b394144.txt">Table of n, a(n) for n = 0..300</a>

%H S. Dimitrov, N. Fox, K. Hadaway, A. Tharp, and S. Wagner, <a href="https://arxiv.org/abs/2602.16055">Counting Colored Trees</a>, arXiv:2602.16055 [math.CO], 2026.

%o (Python)

%o def A394144(n):

%o A = [[1, 1, 0], [1, 0, 1], [1, 0, 0]]

%o if n == 0:

%o return 0

%o m = len(A)

%o output = [[1] for i in range(m)]

%o for l in range(2, n + 1):

%o for i in range(m):

%o term = 0

%o for k in range(1, l):

%o for j in range(m):

%o term += A[i][j] * output[i][k - 1] * output[j][l - k - 1]

%o output[i].append(term)

%o return output[1][n - 1]

%Y Cf. A394143, A394145.

%K nonn

%O 0,3

%A _Nathan Fox_, Mar 11 2026