cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A184156 The Wiener polarity index of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 2, 2, 2, 2, 3, 0, 2, 4, 0, 3, 3, 3, 4, 3, 4, 4, 6, 4, 3, 5, 3, 0, 4, 3, 4, 6, 3, 3, 5, 4, 4, 6, 4, 4, 7, 6, 5, 4, 4, 6, 4, 6, 0, 9, 5, 6, 4, 5, 3, 7, 6, 4, 8, 0, 6, 6, 3, 4, 7, 7, 4, 8, 6, 6, 8, 6, 5, 8, 4, 5, 12, 5, 6, 9, 5, 6, 6, 5, 4, 10, 6, 8, 5, 7, 5, 5, 6, 8, 8, 8, 6, 6, 9, 8, 9, 4, 6, 12, 5, 7
Offset: 1

Views

Author

Emeric Deutsch, Oct 12 2011

Keywords

Comments

The Wiener polarity index of a connected graph G is the number of unordered pairs {i,j} of vertices of G such that the distance between i and j is 3.
The Matula-Goebel number of a rooted tree is 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.

Examples

			a(7)=0 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y with no pair of vertices at distance 3.
a(11) = 2 because the rooted tree with Matula-Goebel number 7 is a path on 5 vertices, say a, b, c, d, e, with each of the pairs {a,d} and {b,e} at distance 3.
		

References

  • H. Deng, H. Xiao and F. Tang, On the extremal Wiener polarity index of trees with a given diameter, MATCH, Commun. Math. Comput. Chem., 63, 2010, 257-264.
  • W. Du, X. Li and Y. Shi, Algorithms and extremal problem on Wiener polarity index, MATCH, Commun. Math. Comput. Chem., 62, 2009, 235-244.

Crossrefs

Programs

  • Maple
    with(numtheory): WP := proc (n) local r, s, R: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: R := proc (n) if n = 1 then 0 elif bigomega(n) = 1 then sort(expand(x*R(pi(n))+x)) else sort(expand(R(r(n))+R(s(n)))) end if end proc: if n = 1 then 0 elif bigomega(n) = 1 then sort(expand(WP(pi(n))+x*R(pi(n))+x)) else sort(expand(WP(r(n))+WP(s(n))+R(r(n))*R(s(n)))) end if end proc: a := proc (n) options operator, arrow: coeff(WP(n), x, 3) end proc: seq(a(n), n = 1 .. 110);
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    R[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, x*R[PrimePi[n]] + x, True,  R[r[n]] + R[s[n]]];
    WP[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, WP[PrimePi[n]] + x*R[PrimePi[n]] + x, True, WP[r[n]] + WP[s[n]] + R[r[n]]*R[s[n]]];
    a[n_] := Coefficient[WP[n], x, 3];
    Table[a[n], {n, 1, 110}] (* Jean-François Alcover, Jun 21 2024, after Maple code *)

Formula

a(n) is the coefficient of x^3 in the Wiener polynomial of the rooted tree with Matula-Goebel number n. The coefficients of these Wiener polynomials are given in A196059. The Maple program is based on the above.