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.

A196059 Triangle read by rows: T(n,k) is the number of pairs of nodes at distance k in the rooted tree having Matula-Goebel number n (n>=2).

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 2, 1, 3, 2, 1, 3, 3, 3, 3, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 4, 4, 2, 4, 4, 2, 4, 4, 2, 5, 4, 3, 2, 1, 4, 6, 4, 4, 2, 5, 5, 4, 1, 4, 6, 5, 5, 3, 2, 5, 5, 3, 2, 5, 4, 3, 2, 1, 5, 5, 4, 1, 5, 7, 3, 6, 5, 4, 3, 2, 1, 5, 5, 4, 1, 6, 6, 6, 3, 5, 6, 4, 5, 5, 3, 2, 6, 6, 5, 3, 1, 5, 4, 3, 2, 1, 5, 10, 6, 5, 4, 3, 2, 1, 5, 5, 3, 2, 6, 6, 4, 3, 2
Offset: 2

Views

Author

Emeric Deutsch, Sep 30 2011

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.
Number of entries in row n is A196058(n) (n=2,3,...).
The generating polynomial of row n is the Wiener polynomial of the rooted tree having Matula-Goebel number n.

Examples

			Row n=7 is [3,3] because the rooted tree with Matula-Goebel number 7 is the rooted tree Y, having distances 1,1,1,2,2,2.
Row n=2^m is [m, m(m-1)/2] because the rooted tree with Matula-Goebel number 2^m is a star with m edges; there are m distances 1 and m(m-1)/2 distances 2.
Triangle starts:
  1;
  2,1;
  2,1;
  3,2,1;
  3,2,1;
  3,3;
  3,3;
  4,3,2,1;
  4,3,2,1;
  ...
		

References

  • B. E. Sagan, Y-N. Yeh and P. Zhang, The Wiener Polynomial of a Graph, Internat. J. of Quantum Chem., 60, 1996, 959-969.

Crossrefs

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: for n from 2 to 35 do seq(coeff(W(n), x, k), k = 1 .. degree(W(n))) end do; # yields sequence in triangular form
    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: W(987654321);
  • 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]]];
    T[n_] := Rest@CoefficientList[W[n], x];
    Table[T[n], {n, 2, 35}] // Flatten (* Jean-François Alcover, Jun 19 2024, after first Maple code *)

Formula

We give the recursive construction of the row generating polynomials W(n)=W(n,x) (the Wiener polynomials). Let R(n) be the partial Wiener polynomial with respect to the root (defined, computed and programmed in A196056). W(1)=0; if n = prime(t) (=the t-th prime), then W(n)=W(t)+x*R(t) + x; if n=r*s (r,s>=2), then W(n)=W(r)+W(s)+R(r)R(s) (2nd Maple program yields the Wiener polynomial W(n)).