login
The terminal Wiener index of the rooted tree with Matula-Goebel number n.
2

%I #25 Nov 12 2021 03:50:09

%S 0,1,2,2,3,3,6,6,4,4,4,8,8,8,5,12,8,10,12,10,10,5,10,15,6,10,12,16,10,

%T 12,5,20,6,10,12,18,15,15,12,18,10,19,16,12,14,12,12,24,20,14,12,19,

%U 20,21,7,26,18,12,10,21,18,6,22,30,14,14,15,20,14,22,18,28,19,18,16,26,14,22,12,28,24,12,12,30,14,19,14,21,24,24

%N The terminal Wiener index of the rooted tree with Matula-Goebel number n.

%C The terminal Wiener index of a connected graph is the sum of the distances between all pairs of nodes of degree 1.

%C The Matula-Goebel number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m >= 2 there corresponds the product of the Matula-Goebel numbers of the m branches of T.

%H Emeric Deutsch, <a href="http://arxiv.org/abs/1111.4288">Tree statistics from Matula numbers</a>, arXiv preprint arXiv:1111.4288 [math.CO], 2011.

%H F. Goebel, <a href="http://dx.doi.org/10.1016/0095-8956(80)90049-0">On a 1-1-correspondence between rooted trees and natural numbers</a>, J. Combin. Theory, B 29 (1980), 141-143.

%H I. Gutman, B. Furtula and M. Petrovic, <a href="https://www.researchgate.net/publication/226767757_Terminal_Wiener_index">Terminal Wiener index</a>, J. Math. Chem., 46. 2009, 522-531.

%H I. Gutman and A. Ivic, <a href="http://dx.doi.org/10.1016/0012-365X(95)00182-V">On Matula numbers</a>, Discrete Math., 150, 1996, 131-142.

%H I. Gutman and Yeong-Nan Yeh, <a href="http://www.emis.de/journals/PIMB/067/3.html">Deducing properties of trees from their Matula numbers</a>, Publ. Inst. Math., 53 (67), 1993, 17-22.

%H D. W. Matula, <a href="http://www.jstor.org/stable/2027327">A natural rooted tree enumeration by prime factorization</a>, SIAM Rev. 10 (1968) 273.

%H <a href="/index/Mat#matula">Index entries for sequences related to Matula-Goebel numbers</a>

%F Let LV(m) and EPL(m) denote the number of leaves and the external path length, respectively, of the rooted tree with Matula number m (see A109129 and A196048, where LV(m) and EPL(m) are obtained recursively). a(1)=0; if n=p(t) (=the t-th prime) and t is prime, then a(n) = a(t) + LV(t); if n=p(t) (=the t-th prime) and t is not prime, then a(n) = a(t) + LV(t) + EPL(t). Now assume that n is not prime; it can be written n=rs, where r is prime and s >= 2. If s is prime, then a(n) = a(r) - EPL(r) + a(s) - EPL(s) + EPL(r)*LV(s) + EPL(s)*LV(r); if s is not prime, then a(n) = a(r) - EPL(r) + a(s) + EPL(r)*LV(s) + EPL(s)*LV(r); the Maple program is based on this recursive formula.

%F If m > 2 then a(2^m) = m(m-1) because the rooted tree with Matula-Goebel number 2^m is a star with m edges and the vertices of each of the binomial(m,2) pairs of nodes of degree 1 are at distance 2.

%e a(7)=6 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y (2+2+2=6).

%p with(numtheory): TW := proc (n) local r, s, LV, EPL, Tw: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: LV := proc (n) if n = 1 then 0 elif n = 2 then 1 elif bigomega(n) = 1 then LV(pi(n)) else LV(r(n))+LV(s(n)) end if end proc: EPL := proc (n) if n = 1 then 0 elif n = 2 then 1 elif bigomega(n) = 1 then EPL(pi(n))+LV(pi(n)) else EPL(r(n))+EPL(s(n)) end if end proc: Tw := proc (n) if n = 1 then 0 elif bigomega(n) = 1 then Tw(pi(n)) else Tw(r(n))+Tw(s(n))+EPL(r(n))*LV(s(n))+EPL(s(n))*LV(r(n)) end if end proc: if n = 1 then 0 elif bigomega(n) = 1 and bigomega(pi(n)) = 1 then TW(pi(n))+LV(pi(n)) elif bigomega(n) = 1 then TW(pi(n))+EPL(n) else Tw(r(n))+Tw(s(n))+EPL(r(n))*LV(s(n))+EPL(s(n))*LV(r(n)) end if end proc; seq(TW(n), n = 1 .. 90);

%Y Cf. A109129, A196048, A196051, A348959.

%K nonn

%O 1,3

%A _Emeric Deutsch_, Sep 29 2011