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.

Showing 1-8 of 8 results.

A196060 The hyper-Wiener index of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 1, 5, 5, 15, 15, 12, 12, 35, 35, 35, 28, 28, 28, 70, 22, 28, 54, 22, 58, 58, 70, 54, 44, 126, 54, 90, 47, 58, 99, 70, 35, 126, 58, 108, 76, 44, 44, 99, 84, 54, 83, 47, 108, 150, 90, 99, 63, 91, 165, 108, 83, 35, 118, 210, 69, 84, 99, 58, 131, 76, 126, 129, 51, 170, 170, 44, 91, 150, 143, 84, 101, 83, 76, 231
Offset: 1

Views

Author

Emeric Deutsch, Sep 30 2011

Keywords

Comments

The hyper-Wiener index of a connected graph is (1/2)*Sum [d(i,j)+d(i,j)^2], where d(i,j) is the distance between the vertices i and j and summation is over all unordered pairs of vertices (i,j).
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.

Examples

			a(7)=12 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y; the distances are 1,1,1,2,2,2; sum of distances = 9; sum of squared distances = 15; (9+15)/2=12.
a(2^m) = m(3m-1)/2 because the rooted tree with Matula-Goebel number 2^m is a star with m edges and we have m distances 1 and m(m-1)/2 distances 2; sum of the  distances = m^2; sum of the squared distances = 2m^2 - m; hyper-Wiener index is (1/2)(3m^2 - m).
		

Crossrefs

Cf. A196059.

Programs

  • Maple
    with(numtheory): W := 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(W(pi(n))+x*R(pi(n))+x)) else sort(expand(W(r(n))+W(s(n))+R(r(n))*R(s(n)))) end if end proc: a := proc (n) options operator, arrow: subs(x = 1, diff(W(n), x)+(1/2)*(diff(W(n), `$`(x, 2)))) end proc: seq(a(n), n = 1 .. 75);
  • 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]]];
    W[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, W[PrimePi[n]] + x*R[PrimePi[n]] + x, True, W[r[n]] + W[s[n]] + R[r[n]]*R[s[n]]];
    a[n_] := (D[W[n], x] /. x -> 1) + (1/2)*(D[W[n], {x, 2}] /. x -> 1);
    Table[a[n], {n, 1, 75}] (* Jean-François Alcover, Jun 19 2024, after Maple code *)

Formula

a(n) = W'(n,1) + (1/2)W"(n,1), where W(n,x) is the Wiener polynomial (also called Hosoya polynomial) of the rooted tree with Matula-Goebel index n. W(n)=W(n,x) is obtained recursively in A196059. The Maple program is based on the above.

A184157 The sum of the even distances in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 2, 2, 4, 4, 6, 6, 10, 10, 10, 8, 8, 8, 16, 12, 8, 14, 12, 18, 18, 16, 14, 14, 28, 14, 24, 12, 18, 24, 16, 20, 28, 18, 24, 20, 14, 14, 24, 28, 14, 22, 12, 24, 34, 24, 24, 22, 30, 40, 24, 22, 20, 30, 40, 18, 28, 24, 18, 34, 20, 28, 36, 30, 36, 36, 14, 30, 34, 32, 28, 28, 22, 20, 50, 18, 42, 32, 24, 40
Offset: 1

Views

Author

Emeric Deutsch, Oct 15 2011

Keywords

Comments

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.
a(n) + A184158(n) = A196051(n) (= the Wiener index of the rooted tree with Matula-Goebel number n).

Examples

			a(7)=6 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y with 3 distances equal to 2.
		

References

  • O. Ivanciuc, T. Ivanciuc, D. J. Klein, W. A. Seitz, and A. T. Balaban, Wiener index extension by counting even/odd graph distances, J. Chem. Inf. Comput. Sci., 41, 2001, 536-549.

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: (1/2)*subs(x = 1, diff(WP(n), x))-(1/2)*subs(x = -1, diff(WP(n), x)) end proc: seq(a(n), n = 1 .. 80);
  • 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_] := (1/2)(D[WP[n], x] /. x -> 1) - (1/2)(D[WP[n], x] /. x -> -1);
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jun 21 2024, after Maple code *)

Formula

a(n) is the value at x=1 of the derivative of the even part of the Wiener polynomial W(n)=W(n,x) of the rooted tree with Matula number n. W(n) is obtained recursively in A196059. The Maple program is based on the above.

A184158 The sum of the odd distances in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 1, 2, 2, 6, 6, 3, 3, 10, 10, 10, 10, 10, 10, 19, 4, 10, 17, 4, 14, 14, 19, 17, 14, 28, 17, 24, 17, 14, 26, 19, 5, 28, 14, 28, 24, 14, 14, 26, 18, 17, 24, 17, 28, 38, 24, 26, 18, 18, 35, 28, 24, 5, 34, 44, 24, 18, 26, 14, 33, 24, 28, 31, 6, 40, 40, 14, 18, 38, 38, 18, 31, 24, 24, 52, 24, 37, 36, 28, 22
Offset: 1

Views

Author

Emeric Deutsch, Oct 15 2011

Keywords

Comments

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.
a(n) + A184157(n) = A196051(n) (= the Wiener index of the rooted tree with Matula-Goebel number n).

Examples

			a(7)=3 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y with 3 distances equal to 1.
		

References

  • O. Ivanciuc, T. Ivanciuc, D. J. Klein, W. A. Seitz, and A. T. Balaban, Wiener index extension by counting even/odd graph distances, J. Chem. Inf. Comput. Sci., 41, 2001, 536-549.

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: (1/2)*subs(x = 1, diff(WP(n), x))+(1/2)*subs(x = -1, diff(WP(n), x)) end proc: seq(a(n), n = 1 .. 80);
  • 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_] := (1/2)(D[WP[n], x] /. x -> 1) + (1/2)(D[WP[n], x] /. x -> -1);
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jun 21 2024, after Maple code *)

Formula

a(n) is the value at x=1 of the derivative of the odd part of the Wiener polynomial W(n)=W(n,x) of the rooted tree with Matula number n. W(n) is obtained recursively in A196059. The Maple program is based on the above.

A228599 The Wiener index of the graph obtained by applying Mycielski's construction to the rooted tree having Matula-Goebel number n.

Original entry on oeis.org

5, 15, 33, 33, 62, 62, 59, 59, 103, 103, 103, 99, 99, 99, 156, 93, 99, 151, 93, 152, 152, 156, 151, 144, 221, 151, 215, 147, 152, 216, 156, 135, 221, 152, 217, 207, 144, 144, 216, 209, 151, 211, 147, 217, 292, 215, 216, 197, 213, 293, 217, 211
Offset: 1

Views

Author

Emeric Deutsch, Aug 29 2013

Keywords

Comments

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.
a(2^n) = A228318(n). Indeed, the rooted tree corresponding to the Matula-Goebel number 2^n is the star graph K(1,n).
a(A007097(n)) = A228321(n). Indeed, A007097(n) for n=1,2,... yields the primeth recurrence sequence (A007097(1)=2, A007097(n+1)=A007097(n)-th prime; first few terms are 2,3,5,11,31,127,709). The corresponding rooted trees are the path trees on n+1 vertices.

References

  • D. B. West, Introduction to Graph Theory, 2nd ed., Prentice-Hall, NJ, 2001, p. 205.

Crossrefs

Programs

  • Maple
    with(numtheory): V := proc (n) local u, v: u := proc (n) options operator, arrow: op(1, factorset(n)) end proc: v := proc (n) options operator, arrow: n/u(n) end proc: if n = 1 then 1 elif isprime(n) then 1+V(pi(n)) else V(u(n))+V(v(n))-1 end if end proc: 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: p2 := proc (n) options operator, arrow: coeff(WP(n), x, 2) end proc: p3 := proc (n) options operator, arrow: coeff(WP(n), x, 3) end proc: a := proc (n) options operator, arrow: 6*V(n)^2-8*V(n)+7-4*p2(n)-p3(n) end proc: seq(a(n), n = 1 .. 80);

Formula

In Balakrishnan et al. one proves that the Wiener index of the Mycielskian of a connected graph G is 6V^2 - V - 7E - 4p(2) - p(3), where V is number of vertices of G, E is number of edges in G, and p(i) is number of pairs of vertices in G which are at distance i. For the rooted tree with Matula-Goebel number n these quantities can be found in A061775, A196050, and A196059.

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.

A196061 The multiplicative Wiener index of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

1, 2, 2, 12, 12, 8, 8, 288, 288, 288, 144, 144, 144, 34560, 64, 144, 10368, 64, 13824, 13824, 34560, 10368, 3456, 24883200, 10368, 2985984, 5184, 13824, 4976640, 34560, 1024, 24883200, 13824, 8294400, 746496, 3456, 3456, 4976640, 1327104, 10368, 1492992, 5184, 8294400, 7166361600
Offset: 2

Views

Author

Emeric Deutsch, Sep 30 2011

Keywords

Comments

The multiplicative Wiener index of a connected graph is the product of the distances between all unordered pairs of vertices in the graph.
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)=8 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y with distances 1,1,1,2,2,2; product of distances is 8.
a(2^m) = 2^[m(m-1)/2] because the rooted tree with Matula-Goebel number 2^m is a star with m edges and we have m distances 1 and m(m-1)/2 distances 2.
		

References

  • F. Goebel, On a 1-1-correspondence between rooted trees and natural numbers, J. Combin. Theory, B 29 (1980), 141-143.
  • I. Gutman and A. Ivic, On Matula numbers, Discrete Math., 150, 1996, 131-142.
  • I. Gutman, W. Linert, I. Lukovits, and Z. Tomovic, The multiplicative version of the Wiener index, J. Chem. Inf. Comput. Sci., 40, 2000, 113-116.
  • I. Gutman, W. Linert, I. Lukovits, and Z. Tomovic, On the multiplicative Wiener index and its possible chemical applications, Monatshefte f. Chemie, 131, 2000, 421-427.
  • 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 Review, 10, 1968, 273.

Crossrefs

Cf. A196059.

Programs

  • Maple
    with(numtheory): W := 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(W(pi(n))+x*R(pi(n))+x)) else sort(expand(W(r(n))+W(s(n))+R(r(n))*R(s(n)))) end if end proc: a := proc (n) options operator, arrow: product(k^coeff(W(n), x, k), k = 1 .. degree(W(n))) end proc: seq(a(n), n = 2 .. 45);
  • 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]]];
    W[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, W[PrimePi[n]] + x*R[PrimePi[n]] + x, True, W[r[n]] + W[s[n]] + R[r[n]]*R[s[n]]];
    a[n_] := Product[k^Coefficient[W[n], x, k], {k, 1, Exponent[W[n], x]}];
    Table[a[n], {n, 2, 45}] (* Jean-François Alcover, Jun 22 2024, after Maple code *)

Formula

a(n) = Product_{k=1..d} k^c(k), where d is the diameter of the rooted tree with Matula-Goebel number n, and c(k) is the number of pairs of nodes at distance k (all these data are contained in the Wiener polynomial; see A196059). The Maple program is based on the above.

A196066 The reverse Wiener index of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 2, 2, 8, 8, 3, 3, 20, 20, 20, 12, 12, 12, 40, 4, 12, 29, 4, 28, 28, 40, 29, 17, 70, 29, 36, 16, 28, 55, 40, 5, 70, 28, 53, 40, 17, 17, 55, 38, 29, 38, 16, 53, 68, 36, 55, 23, 36, 93, 53, 38, 5, 48, 112, 21, 38, 55, 28, 73, 40, 70, 45, 6, 92, 92, 17, 36, 68, 70, 38, 53, 38, 40, 114, 21, 89, 72, 53, 50
Offset: 1

Views

Author

Emeric Deutsch, Oct 01 2011

Keywords

Comments

The reverse Wiener index of a connected graph is (1/2)N(N-1)D - W, where N, D, and W are, respectively, the number of vertices, the diameter, and the Wiener index of the graph.
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)=3 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y with N=4, d=2, W=9 (distances are 1,1,1,2,2,2); (1/2)*4*3*2-9 = 3.
		

References

  • F. Goebel, On a 1-1-correspondence between rooted trees and natural numbers, J. Combin. Theory, B 29 (1980), 141-143.
  • 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 Review, 10, 1968, 273.
  • A. T. Balaban, D. Mills, O. Ivanciuc, and S. C. Basak, Reverse Wiener indices, Croatica Chemica Acta, 73 (4), 2000, 923-941.

Crossrefs

Cf. A196059.

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: N := proc (n) options operator, arrow: 1+coeff(Wp(n), x) end proc: d := proc (n) options operator, arrow: degree(Wp(n)) end proc: W := proc (n) options operator, arrow: subs(x = 1, diff(Wp(n), x)) end proc: a := proc (n) options operator, arrow: (1/2)*N(n)*(N(n)-1)*d(n)-W(n) end proc: 0, seq(a(n), n = 2 .. 80);
  • 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]]];
    V[n_] := 1 + Coefficient[Wp[n], x];
    d[n_] := Exponent[Wp[n], x];
    W[n_] := D[Wp[n], x] /. x -> 1;
    a[n_] := If[n == 1, 0, (1/2)*V[n]*(V[n] - 1)*d[n] - W[n]];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jun 22 2024, after Maple code *)

Formula

a(n)=(1/2)N(n)*(N(n)-1)*d(n) - W(n), where N, d, and W are, respectively, the number of vertices, the diameter, and the Wiener index of the rooted tree with Matula-Goebel number n (all these data are contained in the Wiener polynomial; see A196059). The Maple program is based on the above.

A198322 The Matula-Goebel numbers of the rooted trees that have palindromic Wiener polynomials.

Original entry on oeis.org

1, 2, 7, 8, 56, 76, 107, 147, 163, 292, 454, 839, 1433, 4221, 5833, 6137, 7987, 8626, 16216, 17059, 17128, 17764, 23438, 25672, 36812, 41203, 45952, 46428, 51768, 60635, 83009, 86716, 86908, 88321, 91951, 93534, 94542, 99141, 100142, 108848, 120357, 124783, 133741, 136768, 137941, 140079, 142424, 145404, 145654
Offset: 1

Views

Author

Emeric Deutsch, Oct 24 2011

Keywords

Comments

The Wiener polynomials are assumed to have zero constant terms.
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.

Examples

			7 is in the sequence because the rooted tree with Matula-Goebel number 7 is Y; 3 distances are equal to 1 and 3 distances are equal to 2; Wiener polynomial is 3x+3x^2.
		

References

  • G. Caporossi, A. A. Dobrynin, I. Gutman, and P. Hansen, Trees with palindromic Hosoya polynomials, Graph Theory Notes of New York, XXXVI, 1999, 10-16.

Crossrefs

Cf. A196059.

Programs

  • Maple
    with(numtheory): W := 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(W(pi(n))+x*R(pi(n))+x)) else sort(expand(W(r(n))+W(s(n))+R(r(n))*R(s(n)))) end if end proc: A := {}: for n to 100000 do if expand(x^(1+degree(W(n)))*subs(x = 1/x, W(n))) = W(n) then A := `union`(A, {n}) else  end if end do: A;
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    R[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, Expand[x*R[PrimePi[n]] + x], True, Expand[R[r[n]] + R[s[n]]]];
    W[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, Expand[W[PrimePi[n]] + x*R[PrimePi[n]] + x], True, Expand[W[r[n]] + W[s[n]] + R[r[n]]*R[s[n]]]];
    A = {};
    Do[If[n == 1 || Expand[x^(1 + Exponent[W[n], x])*(W[n] /. x -> 1/x)] == W[n], Print[n]; A = Union[A, {n}]], {n, 1, 100000}] // Quiet;
    A (* Jean-François Alcover, Jun 18 2024, after Maple code *)

Formula

The Wiener polynomial W(n,x) of the rooted tree corresponding to the Matula-Goebel number n is given in A196059. It is palindromic if and only if x^{1+degree(W(n,x))}*W(n,1/x)=W(n,x).
Showing 1-8 of 8 results.