OFFSET
0,6
LINKS
E. M. Rains and N. J. A. Sloane, On Cayley's Enumeration of Alkanes (or 4-Valent Trees), J. Integer Sequences, Vol. 2 (1999), Article 99.1.1.
MATHEMATICA
n = 30; (* algorithm from Rains and Sloane *)
S4[f_, h_, x_] := f[h, x]^4/24 + f[h, x]^2 f[h, x^2]/4 + f[h, x] f[h, x^3]/3 + f[h, x^2]^2/8 + f[h, x^4]/4;
S5[f_, h_, x_] := f[h, x]^5/120 + f[h, x]^3 f[h, x^2]/12 + f[h, x]^2 f[h, x^3]/6 + f[h, x] f[h, x^2]^2/8 + f[h, x] f[h, x^4]/4 + f[h, x^2] f[h, x^3]/6 + f[h, x^5]/5;
T[-1, z_] := 1; T[h_, z_] := T[h, z] = Table[z^k, {k, 0, n}].Take[CoefficientList[z^(n+1) + 1 + S4[T, h-1, z]z, z], n+1];
Sum[Take[CoefficientList[z^(n+1) + S5[T, h-1, z]z - S5[T, h-2, z]z - (T[h-1, z] - T[h-2, z]) (T[h-1, z]-1), z], n+1], {h, 1, n/2}] + PadRight[{0, 1}, n+1] (* Robert A. Russell, Sep 15 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved