A196055 The terminal Wiener index of the rooted tree with Matula-Goebel number n.
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, 12, 5, 20, 6, 10, 12, 18, 15, 15, 12, 18, 10, 19, 16, 12, 14, 12, 12, 24, 20, 14, 12, 19, 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
Offset: 1
Keywords
Examples
a(7)=6 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y (2+2+2=6).
Links
- Emeric Deutsch, Tree statistics from Matula numbers, arXiv preprint arXiv:1111.4288 [math.CO], 2011.
- F. Goebel, On a 1-1-correspondence between rooted trees and natural numbers, J. Combin. Theory, B 29 (1980), 141-143.
- I. Gutman, B. Furtula and M. Petrovic, Terminal Wiener index, J. Math. Chem., 46. 2009, 522-531.
- I. Gutman and A. Ivic, On Matula numbers, Discrete Math., 150, 1996, 131-142.
- I. Gutman and Yeong-Nan Yeh, Deducing properties of trees from their Matula numbers, Publ. Inst. Math., 53 (67), 1993, 17-22.
- D. W. Matula, A natural rooted tree enumeration by prime factorization, SIAM Rev. 10 (1968) 273.
- Index entries for sequences related to Matula-Goebel numbers
Programs
-
Maple
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);
Formula
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.
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.
Comments