login
A248097
Number of ordered trees with n edges such that non-leaf vertices at even (odd) level have an even (odd) number of children.
1
1, 0, 1, 2, 2, 8, 15, 34, 93, 208, 548, 1390, 3527, 9318, 24203, 64052, 170392, 454020, 1220651, 3288010, 8897474, 24170066, 65829806, 179901956, 492872483, 1353655974, 3726557183, 10280008874, 28415211437, 78686254872, 218265740153, 606417214412, 1687349373815
OFFSET
0,4
FORMULA
G.f. h(z) is given by h = 1/(1-z^2*g^2), where g = 1 + z*h/(1-z^2*h^2). The function g(z) is the g.f. of the companion sequence A248096.
G.f. h(z) is given by h*((1 - z^2*h^2)^2 - z^2*(1 + z*h - z^2*h^2)^2) = (1 - z^2*h^2)^2.
EXAMPLE
a(4) = 2 because we have (i) the path-trees P[2] and P[3] joined at their endpoints and (ii) the path-trees P[3] and P[2] joined at their endpoints.
MAPLE
eq:= h = 1/(1-z^2*g^2): g:= 1+z*h/(1-z^2*h^2): h := RootOf(eq, h): hser := series(h, z=0, 35): seq(coeff(hser, z, n), n=0..32);
MATHEMATICA
max=40; s[0]={}; s[n_] := s[n] = Join[s[n-1], h=Sum[a[k]*z^k, {k, 0, n}] /. s[n-1]; SolveAlways[h == Normal[Series[1/(1-z^2*g^2) /. g -> 1+z*h/(1-z^2*h^2), {z, 0, n}]], z] // First]; Table[a[n] /. s[n+1], {n, 0, max}] (* Jean-François Alcover, Dec 26 2014, translated and adapted from Maple *)
CROSSREFS
Cf. A248096.
Sequence in context: A363181 A349648 A295193 * A098273 A342835 A361294
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Dec 25 2014
STATUS
approved