A356073 Number of labeled trees on [n] having a centroid.
0, 1, 0, 3, 4, 125, 486, 16807, 118784, 4782969, 50781250, 2357947691, 33981990912, 1792160394037, 32942263538380, 1946195068359375, 43756164738973696, 2862423051509815793
Offset: 0
Keywords
Examples
a(6) = 486. In the illustrations by Sloane found in the link above, for n = 6, there are A027416(3) = 3 trees with a centroid: the third, fourth and fifth trees shown. They have 360, 120, and 6 labelings respectively. 360 + 120 + 6 = 486.
Links
- N. J. A. Sloane, Illustration of initial terms
Programs
-
Mathematica
Prepend[Table[If[EvenQ[n], n^(n - 2) - Binomial[n, n/2] (n/2)^(n - 2)/2, n^(n - 2)], {n, 1, 17}], 0]
Comments