login
A348959
Childless terminal Wiener index of the rooted tree with Matula-Goebel number n.
4
0, 0, 0, 2, 0, 3, 2, 6, 4, 4, 0, 8, 3, 8, 5, 12, 2, 10, 6, 10, 10, 5, 4, 15, 6, 10, 12, 16, 4, 12, 0, 20, 6, 10, 12, 18, 8, 15, 12, 18, 3, 19, 8, 12, 14, 12, 5, 24, 20, 14, 12, 19, 12, 21, 7, 26, 18, 12, 2, 21, 10, 6, 22, 30, 14, 14, 6, 20, 14, 22, 10, 28, 10
OFFSET
1,4
COMMENTS
This is a variation on the terminal Wiener index defined by Gutman, Furtula, and Petrović. Here terminal vertices are taken as the childless vertices, so a(n) is the sum of the path lengths between pairs of childless vertices.
This sequence differs from the free tree form A196055 when n is prime, since n prime means the root is degree 1 so is a terminal vertex for A196055 but not here.
LINKS
F. Goebel, On a 1-1-Correspondence between Rooted Trees and Natural Numbers, Journal of Combinatorial Theory, series B, volume 29, 1980, pages 141-143.
Ivan Gutman, Boris Furtula and Miroslav Petrović, Terminal Wiener Index, Journal of Mathematical Chemistry, volume 46, 2009, pages 522-531.
D. W. Matula, A Natural Rooted Tree Enumeration By Prime Factorization, SIAM Review, volume 10, number 2, April 1968, page 273 (also at JSTOR).
FORMULA
a(n) = Sum_{j=1..k} a(primepi(p[j])) + E(p[j])*(C(n)-C(p[j]))), where n = p[1]*...*p[k] is the prime factorization of n with multiplicity (A027746), E(n) = A196048(n) is external path length, and C(n) = A109129(n) is number of childless vertices.
a(n) = A196055(n) - (A196048(n) if n prime).
a(n) = A196055(A288469(n)).
PROG
(PARI) See links.
CROSSREFS
Cf. A196055 (free tree), A196048 (external path length), A109129 (childless vertices), A288469 (unplant).
Cf. A027746 (prime factorization).
Sequence in context: A266691 A083236 A345421 * A007492 A135351 A079451
KEYWORD
nonn
AUTHOR
Kevin Ryde, Nov 05 2021
STATUS
approved