A036651 Number of centered 6-valent trees with n nodes.
0, 1, 0, 1, 1, 2, 3, 7, 11, 26, 52, 120, 266, 640, 1509, 3702, 9090, 22781, 57452, 146783, 377357, 978342, 2550611, 6690242, 17633855, 46705333, 124227015, 331757697, 889207207, 2391478247, 6451880415, 17457214729, 47363110968
Offset: 0
Keywords
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.
- Index entries for sequences related to trees
Programs
-
Mathematica
n = 20; (* algorithm from Rains and Sloane *) 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; S6[f_,h_,x_] := f[h,x]^6/720 + f[h,x]^4 f[h,x^2]/48 + f[h,x]^3 f[h,x^3]/18 + f[h,x]^2 f[h,x^2]^2/16 + f[h,x]^2 f[h,x^4]/8 + f[h,x] f[h,x^2] f[h,x^3]/6 + f[h,x] f[h,x^5]/5 + f[h,x^2]^3/48 + f[h,x^2] f[h,x^4]/8 + f[h,x^3]^2/18 + f[h,x^6]/6; T[-1,z_] := 1; T[h_,z_] := T[h,z] = Table[z^k, {k,0,n}].Take[CoefficientList[z^(n+1) + 1 + S5[T,h-1,z]z, z], n+1]; Sum[Take[CoefficientList[z^(n+1) + S6[T,h-1,z]z - S6[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 *)