A382096 Number of rooted ordered trees with node weights summing to n, where the root has weight 0, non-root node weights are in {1,2,3}, and no nodes have the same weight as their parent node.
1, 1, 2, 6, 15, 39, 110, 308, 869, 2499, 7238, 21086, 61871, 182523, 540830, 1609238, 4805871, 14398559, 43264896, 130347450, 393650751, 1191441349, 3613345360, 10978726634, 33414836743, 101863289331, 310984519412, 950734751040, 2910319385881, 8919643999157, 27368321239074
Offset: 0
Keywords
Examples
a(3) = 6 counts: o o o o o __o__ | | | / \ / \ / | \ (3) (2) (1) (1) (2) (2) (1) (1) (1) (1) | | (1) (2)
Programs
-
PARI
b(i,j,k,N) = {if(k>N,1, 1/(1-sum(u=1,j, if(u==i,0,x^u*b(u,j,k+1,N-u+1)))))} Gx(k,N) = {my(x='x+O('x^(N+1))); Vec(1/(1-sum(i=1,k, b(i,k,1,N)*x^i)))} Gx(3,20)
Formula
G.f.: G(x) = 1/(1 - b_1(x)*x - b_2(x)*x^2 - b_3(x)*x^3) where b_1(x) = 1/(1 - b_2(x)*x^2 - b_3(x)*x^3), b_2(x) = 1/(1 - b_1(x)*x - b_3(x)*x^3), b_3(x) = 1/(1 - b_1(x)*x - b_2(x)*x^2).