login
Number of series-reduced rooted trees with n leaves of exactly two colors.
3

%I #12 Sep 24 2019 08:17:45

%S 1,6,30,146,719,3590,18283,94648,497757,2652898,14307845,77958746,

%T 428588051,2374676854,13247984959,74357762790,419604029622,

%U 2379243477538,13549087798391,77458553063930,444383895880897,2557639072274418,14763596994726379,85449948037167684

%N Number of series-reduced rooted trees with n leaves of exactly two colors.

%H Andrew Howroyd, <a href="/A319377/b319377.txt">Table of n, a(n) for n = 2..200</a>

%F a(n) = A050381(n) - 2*A000669(n).

%p b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,

%p add(binomial(A(i, k)+j-1, j)*b(n-i*j, i-1, k), j=0..n/i)))

%p end:

%p A:= (n, k)-> `if`(n<2, n*k, b(n, n-1, k)):

%p a:= n-> A(n, 2) -2*A(n, 1):

%p seq(a(n), n=2..30); # _Alois P. Heinz_, Sep 18 2018

%t b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[A[i, k] + j - 1, j]*b[n - i*j, i - 1, k], {j, 0, n/i}]]];

%t A[n_, k_] := If[n < 2, n*k, b[n, n - 1, k]];

%t a[n_] := A[n, 2] - 2*A[n, 1];

%t a /@ Range[2, 30] (* _Jean-François Alcover_, Sep 24 2019, after _Alois P. Heinz_ *)

%o (PARI) \\ here R(n,k) is k-th column of A319254.

%o EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}

%o R(n, k)={my(v=[k]); for(n=2, n, v=concat(v, EulerT(concat(v, [0]))[n])); v}

%o seq(n)={(R(n,2)-2*R(n,1))[2..n]}

%Y Column 2 of A319376.

%Y Cf. A000669, A050381.

%K nonn

%O 2,2

%A _Andrew Howroyd_, Sep 17 2018