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-10 of 12 results. Next

A061775 Number of nodes in rooted tree with Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 22 2001

Keywords

Comments

Let p(1)=2, ... denote the primes. The label f(T) for a rooted tree T is 1 if T has 1 node, otherwise f(T) = Product p(f(T_i)) where the T_i are the subtrees obtained by deleting the root and the edges adjacent to it. (Cf. A061773 for illustration).
Each n occurs A000081(n) times.

Examples

			a(4) = 3 because the rooted tree corresponding to the Matula-Goebel number 4 is "V", which has one root-node and two leaf-nodes, three in total.
See also the illustrations in A061773.
		

Crossrefs

One more than A196050.
Sum of entries in row n of irregular table A214573.
Number of entries in row n of irregular tables A182907, A206491, A206495 and A212620.
One less than the number of entries in row n of irregular tables A184187, A193401 and A193403.
Cf. A005517 (the position of the first occurrence of n).
Cf. A005518 (the position of the last occurrence of n).
Cf. A091233 (their difference plus one).
Cf. A214572 (Numbers k such that a(k) = 8).

Programs

  • Haskell
    import Data.List (genericIndex)
    a061775 n = genericIndex a061775_list (n - 1)
    a061775_list = 1 : g 2 where
       g x = y : g (x + 1) where
          y = if t > 0 then a061775 t + 1 else a061775 u + a061775 v - 1
              where t = a049084 x; u = a020639 x; v = x `div` u
    -- Reinhard Zumkeller, Sep 03 2013
    
  • Maple
    with(numtheory): a := proc (n) local u, v: u := n-> op(1, factorset(n)): v := n-> n/u(n): if n = 1 then 1 elif isprime(n) then 1+a(pi(n)) else a(u(n))+a(v(n))-1 end if end proc: seq(a(n), n = 1..108); # Emeric Deutsch, Sep 19 2011
  • Mathematica
    a[n_] := Module[{u, v}, u = FactorInteger[#][[1, 1]]&; v = #/u[#]&; If[n == 1, 1, If[PrimeQ[n], 1+a[PrimePi[n]], a[u[n]]+a[v[n]]-1]]]; Table[a[n], {n, 108}] (* Jean-François Alcover, Jan 16 2014, after Emeric Deutsch *)
  • PARI
    A061775(n) = if(1==n, 1, if(isprime(n), 1+A061775(primepi(n)), {my(pfs,t,i); pfs=factor(n); pfs[,1]=apply(t->A061775(t),pfs[,1]); (1-bigomega(n)) + sum(i=1, omega(n), pfs[i,1]*pfs[i,2])}));
    for(n=1, 10000, write("b061775.txt", n, " ", A061775(n)));
    \\ Antti Karttunen, Aug 16 2014
    
  • Python
    from functools import lru_cache
    from sympy import isprime, factorint, primepi
    @lru_cache(maxsize=None)
    def A061775(n):
        if n == 1: return 1
        if isprime(n): return 1+A061775(primepi(n))
        return 1+sum(e*(A061775(p)-1) for p, e in factorint(n).items()) # Chai Wah Wu, Mar 19 2022

Formula

a(1) = 1; if n = p_t (= the t-th prime), then a(n) = 1+a(t); if n = uv (u,v>=2), then a(n) = a(u)+a(v)-1.
a(n) = A091238(A091204(n)). - Antti Karttunen, Jan 2004
a(n) = A196050(n)+1. - Antti Karttunen, Aug 16 2014

Extensions

More terms from David W. Wilson, Jun 25 2001
Extended by Emeric Deutsch, Sep 19 2011

A212618 Sum of the distances between all unordered pairs of vertices of degree 2 in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 0, 4, 4, 4, 0, 0, 0, 10, 0, 0, 2, 0, 1, 1, 10, 2, 0, 20, 2, 6, 0, 1, 6, 10, 0, 20, 1, 4, 2, 0, 0, 6, 1, 2, 0, 0, 4, 13, 6, 6, 0, 0, 14, 4, 0, 0, 6, 35, 0, 1, 6, 1, 6, 2, 20, 2, 0, 13, 13, 0, 0, 13, 1, 1, 2, 0, 2, 24, 0, 10, 3, 4, 1, 12, 6, 6, 0, 10, 0, 14, 4, 0, 13, 2, 2, 35, 13
Offset: 1

Views

Author

Emeric Deutsch, May 22 2012

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.

Examples

			a(11)=4 because the rooted tree with Matula-Goebel number 11 is the path tree A - B - C - D - E; the vertices of degree 2 are B, C, and D; we have dist(B,C)+dist(B,D)+dist(C,D) = 1+2+1 = 4.
a(987654321) = 68, as given by the Maple program; the reader can verify this on the rooted tree of Fig. 2 of the Deutsch reference.
		

Crossrefs

Programs

  • Maple
    k := 2: with(numtheory): g := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then 0 elif bigomega(n) = 1 and bigomega(pi(n)) = k-1 then sort(expand(x+x*g(pi(n)))) elif bigomega(n) = 1 and bigomega(pi(n)) = k then sort(expand(-x+x*g(pi(n)))) elif bigomega(n) = 1 and bigomega(pi(n)) <> k-1 and bigomega(pi(n)) <> k then sort(expand(x*g(pi(n)))) elif bigomega(s(n)) = k-1 then sort(expand(1+g(r(n))+g(s(n)))) elif bigomega(s(n)) = k then sort(expand(-1+g(r(n))+g(s(n)))) else sort(g(r(n))+g(s(n))) end if end proc; with(numtheory): a := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then 0 elif bigomega(n) = 1 and bigomega(pi(n)) = k-1 then a(pi(n))+subs(x = 1, diff(g(pi(n)), x)) elif bigomega(n) = 1 and bigomega(pi(n)) = k then a(pi(n))-subs(x = 1, diff(g(pi(n)), x)) elif bigomega(n) = 1 and bigomega(pi(n)) <> k and bigomega(pi(n)) <> k-1 then a(pi(n)) elif bigomega(s(n)) = k-1 then a(r(n))+a(s(n))+subs(x = 1, diff(g(r(n))*g(s(n)), x))+subs(x = 1, diff(g(r(n)), x))+subs(x = 1, diff(g(s(n)), x)) elif bigomega(s(n)) = k then a(r(n))+a(s(n))+subs(x = 1, diff(g(r(n))*g(s(n)), x))-subs(x = 1, diff(g(r(n)), x))-subs(x = 1, diff(g(s(n)), x)) else a(r(n))+a(s(n))+subs(x = 1, diff(g(r(n))*g(s(n)), x)) end if end proc: seq(a(n), n = 1 .. 120);
  • Mathematica
    k = 2;
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    g[n_] := Which[n == 1, 0,
      PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k - 1,
      Expand[x + x*g[PrimePi[n]]] ,
      PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k,
      Expand[-x + x*g[PrimePi[n]]],
      PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] != k - 1 &&
      PrimeOmega[PrimePi[n]] != k, Expand[x*g[PrimePi[n]]],
      PrimeOmega[s[n]] == k - 1, Expand[1 + g[r[n]] + g[s[n]]],
      PrimeOmega[s[n]] == k, Expand[-1 + g[r[n]] + g[s[n]]], True,
      g[r[n]] + g[s[n]]];
    a[n_] := Which[n == 1, 0,
       PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k - 1,
       a[PrimePi[n]] + (D[g[PrimePi[n]], x] /. x -> 1),
       PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k,
       a[PrimePi[n]] - (D[g[PrimePi[n]], x] /. x -> 1),
       PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] != k &&
        PrimeOmega[PrimePi[n]] != k - 1, a[PrimePi[n]],
       PrimeOmega[s[n]] == k - 1,
       a[r[n]] + a[s[n]] + (D[g[r[n]]*g[s[n]], x] /. x -> 1) +
        (D[g[r[n]], x] /. x -> 1) + (D[g[s[n]], x] /. x -> 1) ,
        PrimeOmega[s[n]] == k,
       a[r[n]] + a[s[n]] + (D[g[r[n]]*g[s[n]], x] /. x -> 1) -
        (D[g[r[n]], x] /. x -> 1) - (D[g[s[n]], x] /. x -> 1), True,
       a[r[n]] + a[s[n]] + (D[g[r[n]]*g[s[n]], x] /. x -> 1) ];
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jun 19 2024, after Maple code *)

Formula

We give recurrence formulas for the more general case of vertices of degree k (k>=2). Let bigomega(n) denote the number of prime divisors of n, counted with multiplicities. Let g(n)=g(n,k,x) be the generating polynomial of the vertices of degree k of the rooted tree with Matula-Goebel number n with respect to level. We have a(1) = 0; if n = prime(t) and bigomega(t)=k-1 then a(n) = a(t)+[dg(t)/dx]{x=1}; if n = prime(t) and bigomega(t)=k, then a(n) = a(t)-[dg(t)/dx]{x=1}; if n = prime(t) and bigomega(t) =/ k and =/ k-1, then a(n)= a(t); if n = r*s with r prime, s>=2, bigomega(s)=k-1, then a(n) = a(r) + a(s) + [d[g(r)g(s)]/dx]{x=1} +[dg(r)/dx]{x=1} +[dg(s)/dx]{x=1}; if n = r*s with r prime, s>=2, bigomega(s) =k, then a(n) = a(r) + a(s) + [d[g(r)g(s)]/dx]{x=1} - [dg(r)/dx]{x=1} - [dg(s)/dx]{x=1}; if n = r*s with r prime, s>=2, bigomega(s) != k-1 and != k, then a(n) = a(r) + a(s) + [d[g(r)g(s)]/dx]_{x=1}.

A212619 Sum of the distances between all unordered pairs of vertices of degree 3 in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 4, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 3, 0
Offset: 1

Views

Author

Emeric Deutsch, May 22 2012

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.

Examples

			a(28)=1 because the rooted tree with Matula-Goebel number 28 is obtained by joining the trees I, I, and Y at  their roots; it has 2 vertices of degree 3 (the root and the center of Y), the distance between them is 1.
a(987654321) = 22, as given by the Maple program; the reader can verify this on the rooted tree of Fig. 2 of the Deutsch reference.
		

Crossrefs

Programs

  • Maple
    k := 3: with(numtheory): g := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then 0 elif bigomega(n) = 1 and bigomega(pi(n)) = k-1 then sort(expand(x+x*g(pi(n)))) elif bigomega(n) = 1 and bigomega(pi(n)) = k then sort(expand(-x+x*g(pi(n)))) elif bigomega(n) = 1 and bigomega(pi(n)) <> k-1 and bigomega(pi(n)) <> k then sort(expand(x*g(pi(n)))) elif bigomega(s(n)) = k-1 then sort(expand(1+g(r(n))+g(s(n)))) elif bigomega(s(n)) = k then sort(expand(-1+g(r(n))+g(s(n)))) else sort(g(r(n))+g(s(n))) end if end proc; with(numtheory): a := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then 0 elif bigomega(n) = 1 and bigomega(pi(n)) = k-1 then a(pi(n))+subs(x = 1, diff(g(pi(n)), x)) elif bigomega(n) = 1 and bigomega(pi(n)) = k then a(pi(n))-subs(x = 1, diff(g(pi(n)), x)) elif bigomega(n) = 1 and bigomega(pi(n)) <> k and bigomega(pi(n)) <> k-1 then a(pi(n)) elif bigomega(s(n)) = k-1 then a(r(n))+a(s(n))+subs(x = 1, diff(g(r(n))*g(s(n)), x))+subs(x = 1, diff(g(r(n)), x))+subs(x = 1, diff(g(s(n)), x)) elif bigomega(s(n)) = k then a(r(n))+a(s(n))+subs(x = 1, diff(g(r(n))*g(s(n)), x))-subs(x = 1, diff(g(r(n)), x))-subs(x = 1, diff(g(s(n)), x)) else a(r(n))+a(s(n))+subs(x = 1, diff(g(r(n))*g(s(n)), x)) end if end proc: seq(a(n), n = 1 .. 120);
  • Mathematica
    k = 3;
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    g[n_] := Which[n == 1, 0, PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k - 1, Expand[x + x*g[PrimePi[n]]], PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k, Expand[-x + x*g[PrimePi[n]]], PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] != k - 1 && PrimeOmega[PrimePi[n]] != k,  Expand[x*g[PrimePi[n]]], PrimeOmega[s[n]] == k - 1, Expand[1 + g[r[n]] + g[s[n]]], PrimeOmega[s[n]] == k, Expand[-1 + g[r[n]] + g[s[n]]], True, g[r[n]] + g[s[n]]];
    a[n_] := Which[n == 1, 0, PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k - 1, a[PrimePi[n]] + (D[g[PrimePi[n]], x] /. x -> 1), PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] == k, a[PrimePi[n]] - (D[g[PrimePi[n]], x] /. x -> 1), PrimeOmega[n] == 1 && PrimeOmega[PrimePi[n]] != k && PrimeOmega[PrimePi[n]] != k - 1, a[PrimePi[n]], PrimeOmega[s[n]] == k - 1, a[r[n]] + a[s[n]] + (D[g[r[n]]*g[s[n]], x] /. x -> 1) + (D[g[r[n]], x] /. x -> 1) + (D[g[s[n]], x] /. x -> 1), PrimeOmega[s[n]] == k, a[r[n]] + a[s[n]] + (D[g[r[n]]*g[s[n]], x] /. x -> 1) - (D[g[r[n]], x] /. x -> 1) - (D[g[s[n]], x] /. x -> 1), True, a[r[n]] + a[s[n]] + (D[g[r[n]]*g[s[n]], x] /. x -> 1)];
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jun 19 2024, after Maple code *)

Formula

We give recurrence formulas for the more general case of vertices of degree k (k>=2). Let bigomega(n) denote the number of prime divisors of n, counted with multiplicities. Let g(n)=g(n,k,x) be the generating polynomial of the vertices of degree k of the rooted tree with Matula-Goebel number n with respect to level. We have a(1)=0; if n = prime(t) and bigomega(t) = k-1 then a(n) = a(t) +[dg(t)/dx]{x=1}; if n = prime(t) and bigomega(t) =k, then a(n) = a(t) - [dg(t)/dx]{x=1}; if n = prime(t) and bigomega(t) != k and != k-1, then a(n) = a(t); if n = r*s with r prime, s>=2, bigomega(s) =k-1, then a(n) = a(r) + a(s) + [d[g(r)g(s)]/dx]{x=1} +[dg(r)/dx]{x=1} +[dg(s)/dx]{x=1}; if n = r*s with r prime, s>=2, bigomega(s) =k, then a(n) = a(r) + a(s) + [d[g(r)g(s)]/dx]{x=1} - [dg(r)/dx]{x=1} - [dg(s)/dx]{x=1}; if n = r*s with r prime, s>=2, bigomega(s) =/ k-1 and =/ k, then a(n) = a(r) + a(s) + [d[g(r)g(s)]/dx]_{x=1}.

A212625 Number of vertices in the largest independent vertex subset of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Jun 01 2012

Keywords

Comments

A vertex subset in a tree is said to be independent if no pair of vertices is connected by an edge. The empty set is considered to be independent.
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(5)=2 because the rooted tree with Matula-Goebel number 5 is the path tree R - A - B - C with independent vertex subsets: {}, {R}, {A}, {B}, {C}, {R,B}, {R,C}, {A,C}; their sizes are 0,1,and 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then [x, 1] elif bigomega(n) = 1 then [expand(x*A(pi(n))[2]), expand(A(pi(n))[1])+A(pi(n))[2]] else [sort(expand(A(r(n))[1]*A(s(n))[1]/x)), sort(expand(A(r(n))[2]*A(s(n))[2]))] end if end proc: P := proc (n) options operator, arrow: sort(A(n)[1]+A(n)[2]) end proc: a := proc (n) options operator, arrow: degree(P(n)) end proc: seq(a(n), n = 1 .. 120);
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    A[n_] := Which[n == 1, {x, 1}, PrimeOmega[n] == 1, {x*A[PrimePi[n]][[2]], A[PrimePi[n]][[1]] + A[PrimePi[n]][[2]]}, True, {A[r[n]][[1]] * A[s[n]][[1]]/x, A[r[n]][[2]] * A[s[n]][[2]]}];
    P[n_] := A[n] // Total;
    a[n_] := Exponent[P[n], x];
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jun 19 2024, after Maple code *)

Formula

In A212623 one finds the generating polynomial P(n,x) with respect to the number of vertices of the independent vertex subsets of the rooted tree with Matula-Goebel number n. We have a(n)=degree(P(n,x)).

A212627 Irregular triangle read by rows: T(n,k) is the number of maximal independent vertex subsets with k vertices of the rooted tree with Matula-Goebel number n (n>=1, k>=1).

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Jun 08 2012

Keywords

Comments

A vertex subset in a tree is said to be independent if no pair of vertices is connected by an edge. The empty set is considered to be independent. An independent vertex subset S of a tree is said to be maximal if every vertex that is not in S is joined by an edge to at least one vertex of S.
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 A212625(n).
Sum of entries in row n = A212628(n).
Sum(k*T(n,k), k>=1) = A212629(n).

Examples

			Row 11 is 0, 3, 1 because the rooted tree with Matula-Goebel number 11 is the path tree on 5 vertices R - A - B - C - D; the maximal independent vertex subsets are {R,C}, {A,C}, {A,D}, and {R,B,D}, i.e. none of size 1, three of size 2, and  one of size 3.
Triangle starts:
  1;
  2;
  1,2;
  1,1;
  0,3;
  ...
		

Crossrefs

Programs

  • Maple
    with(numtheory): P := proc (n) local r, s, A, B, C: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: A := proc (n) if n = 1 then x elif bigomega(n) = 1 then x*(B(pi(n))+C(pi(n))) else A(r(n))*A(s(n))/x end if end proc: B := proc (n) if n = 1 then 0 elif bigomega(n) = 1 then A(pi(n)) else sort(expand(B(r(n))*B(s(n))+B(r(n))*C(s(n))+B(s(n))*C(r(n)))) end if end proc: C := proc (n) if n = 1 then 1 elif bigomega(n) = 1 then B(pi(n)) else expand(C(r(n))*C(s(n))) end if end proc: if n = 1 then x else sort(expand(A(n)+B(n))) end if end proc: for n to 12 do seq(coeff(P(n), x, j), j = 1 .. degree(P(n))) end do; # yields sequence in triangular form
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    A[n_] := Which[n == 1, x, PrimeOmega[n] == 1, x*(B[PrimePi[n]] + c[PrimePi[n]]), True, A[r[n]]*A[s[n]]/x];
    B[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, A[PrimePi[n]], True, B[r[n]]*B[s[n]] + B[r[n]]*c[s[n]] + B[s[n]]*c[r[n]]];
    c[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, B[PrimePi[n]], True,  c[r[n]]*c[s[n]]];
    P[n_] := A[n] + B[n];
    T[n_] := Rest@CoefficientList[P[n], x];
    Table[T[n], {n, 1, 50}] // Flatten (* Jean-François Alcover, Jun 19 2024, after Maple code *)

Formula

Let A(n)=A(n,x), B(n)=B(n,x), C(n)=C(n,x) be the generating polynomial with respect to size of the maximal independent sets that contain the root, the maximal independent sets that do not contain the root, and the independent sets which are not maximal but become maximal if the root is removed, respectively. We have : A(1)=x, B(1)=0, C(1)=1, A(t-th prime) = x[B(t) + C(t)], B(t-th prime) = A(t), C(t-th prime)=B(t), A(rs)=A(r)A(s)/x, B(rs)=B(r)B(s)+B(r)C(s)+B(s)C(r), C(rs)=C(r)C(s) (r,s>=2). The generating polynomial of the maximal independent vertex subsets of the r oo ted tree with Matula-Goebel number n, with respect to number of vertices, is P(n)=P(n,x)=A(n)+B(n). The Maple program is based on these relations.

A212628 Number of maximal independent vertex subsets in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 2, 2, 4, 4, 4, 3, 3, 3, 5, 2, 3, 5, 2, 4, 4, 5, 5, 3, 7, 5, 8, 3, 4, 6, 5, 2, 7, 4, 5, 5, 3, 3, 6, 4, 5, 5, 3, 5, 9, 8, 6, 3, 4, 8, 5, 5, 2, 9, 9, 3, 4, 6, 4, 6, 5, 7, 8, 2, 8, 8, 3, 4, 9, 6, 4, 5, 5, 5, 11, 3, 7, 8, 5, 4, 16, 6, 8, 5, 7, 5, 8, 5, 3, 10, 6, 8, 9, 9, 5, 3, 8, 5, 13, 8, 5, 6, 9, 5, 9, 3, 3, 9, 6, 10, 6, 3, 6, 5, 13, 6, 12, 5, 5, 6
Offset: 1

Views

Author

Emeric Deutsch, Jun 08 2012

Keywords

Comments

A vertex subset in a tree is said to be independent if no pair of vertices is connected by an edge. The empty set is considered to be independent. An independent vertex subset S of a tree is said to be maximal if every vertex that is not in S is joined by an edge to at least one vertex of S.
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.
Let A(n)=A(n,x), B(n)=B(n,x), C(n)=C(n,x) be the generating polynomial with respect to size of the maximal independent sets that contain the root, the maximal independent sets that do not contain the root, and the independent sets which are not maximal but become maximal if the root is removed, respectively. We have A(1)=x, B(1)=0, C(1)=1, A(t-th prime) = x[B(t) + C(t)], B(t-th prime) = A(t), C(t-th prime)=B(t), A(rs)=A(r)A(s)/x, B(rs)=B(r)B(s)+B(r)C(s)+B(s)C(r), C(rs)=C(r)C(s) (r,s>=2). The generating polynomial of the maximal independent vertex subsets with respect to size is P(n, x)=A(n,x)+B(n,x). Then a(n) = P(1,n). The Maple program is based on these relations.

Examples

			a(11)=4 because the rooted tree with Matula-Goebel number 11 is the path tree on 5 vertices R - A - B - C - D; the maximal independent vertex subsets are {R,C}, {A,C}, {A,D}, and {R,B,D}.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P := proc (n) local r, s, A, B, C: r := n -> op(1, factorset(n)): s := n -> n/r(n): A := proc (n) if n = 1 then x elif bigomega(n) = 1 then x*(B(pi(n))+C(pi(n))) else A(r(n))*A(s(n))/x end if end proc: B := proc (n) if n = 1 then 0 elif bigomega(n) = 1 then A(pi(n)) else sort(expand(B(r(n))*B(s(n))+B(r(n))*C(s(n))+B(s(n))*C(r(n)))) end if end proc: C := proc (n) if n = 1 then 1 elif bigomega(n) = 1 then B(pi(n)) else expand(C(r(n))*C(s(n))) end if end proc: if n = 1 then x else sort(expand(A(n)+B(n))) end if end proc: seq(subs(x = 1, P(n)), n = 1 .. 120);
    # For a more efficient calculation, the procedure P() could easily be simplified and optimized to yield A212628(n): remove "sort(expand...)" and replace x with 1 in appropriate places. - M. F. Hasler, Jan 06 2013
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    A[n_] := Which[n == 1, x, PrimeOmega[n] == 1, x*(B[PrimePi[n]] + c[PrimePi[n]]), True, A[r[n]]*A[s[n]]/x];
    B[n_] := Which[n == 1, 0, PrimeOmega[n] == 1, A[PrimePi[n]], True, B[r[n]]*B[s[n]] + B[r[n]]*c[s[n]] + B[s[n]]*c[r[n]]];
    c[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, B[PrimePi[n]], True, c[r[n]]*c[s[n]]];
    P[n_] := A[n] + B[n];
    a[n_] := CoefficientList[P[n], x] // Total;
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jun 20 2024, after Maple code *)

Formula

a(n) = Sum_{k>=1} A212627(n,k).

A212621 The overall first Zagreb index of the rooted tree having Matula-Goebel number n.

Original entry on oeis.org

0, 2, 10, 10, 28, 28, 36, 36, 60, 60, 60, 80, 80, 80, 110, 112, 80, 158, 112, 146, 146, 110, 158, 222, 182, 158, 294, 196, 146, 266, 110, 320, 182, 146, 238, 414, 222, 222, 266, 370, 158, 354, 196, 238, 472, 294, 266, 594, 312, 424, 238, 354, 320, 744, 280, 494, 370, 266, 146, 660, 414, 182, 624
Offset: 1

Views

Author

Emeric Deutsch, Jun 01 2012

Keywords

Comments

The overall first Zagreb index of any simple connected graph G is defined as the sum of the first Zagreb indices of all the subgraphs of G. The first Zagreb index of a simple connected graph is the sum of the squared degrees of its vertices.
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(3)=10 because the rooted tree with Matula-Goebel number 3 is the path tree with 3 vertices R - A - B; the subtrees are R, A, B, RA, AB, and RAB with first Zagreb indices 0, 0, 0, 2, 2, and 6, respectively.
		

References

  • D. Bonchev and N. Trinajstic, Overall molecular descriptors. 3. Overall Zagreb indices, SAR and QSAR in Environmental Research, 12, 2001, 213-236.
  • 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 Y-N. 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

Programs

  • Maple
    with(numtheory); Z1 := proc (n) local r, s; r := proc (n) options operator, arrow; op(1, factorset(n)) end proc; s := proc (n) options operator, arrow; n/r(n) end proc; if n = 1 then 0 elif bigomega(n) = 1 then Z1(pi(n))+2+2*bigomega(pi(n)) else Z1(r(n))+Z1(s(n))-bigomega(r(n))^2-bigomega(s(n))^2+bigomega(n)^2 end if end proc; m2union := proc (x, y) sort([op(x), op(y)]) end proc; with(numtheory); MRST := proc (n) local r, s; r := proc (n) options operator, arrow; op(1, factorset(n)) end proc; s := proc (n) options operator, arrow; n/r(n) end proc; if n = 1 then [1] elif bigomega(n) = 1 then [1, seq(ithprime(mrst[pi(n)][i]), i = 1 .. nops(mrst[pi(n)]))] else [seq(seq(mrst[r(n)][i]*mrst[s(n)][j], i = 1 .. nops(mrst[r(n)])), j = 1 .. nops(mrst[s(n)]))] end if end proc; MNRST := proc (n) local r, s; r := proc (n) options operator, arrow; op(1, factorset(n)) end proc; s := proc (n) options operator, arrow; n/r(n) end proc; if n = 1 then [] elif bigomega(n) = 1 then m2union(mrst[pi(n)], mnrst[pi(n)]) else m2union(mnrst[r(n)], mnrst[s(n)]) end if end proc; MST := proc (n) m2union(mrst[n], mnrst[n]) end proc; for n to 2000 do mrst[n] := MRST(n); mnrst[n] := MNRST(n); mst[n] := MST(n) end do; OZ1 := proc (n) options operator, arrow; add(Z1(MST(n)[j]), j = 1 .. nops(MST(n))) end proc; seq(OZ1(n), n = 1 .. 120); # MRST considers the subtrees that contain the root; MNRST considers the subtrees that do not contain the root; MST considers all subtrees.

Formula

A198339(n) gives the sequence of the Matula-Goebel numbers of all the subtrees of the rooted tree with Matula-Goebel number n. A196053(k) is the first Zagreb index of the rooted tree with Matula-Goebel number k.

A212622 The overall second Zagreb index of the rooted tree having Matula-Goebel number n.

Original entry on oeis.org

0, 1, 6, 6, 19, 19, 24, 24, 44, 44, 44, 59, 59, 59, 85, 80, 59, 125, 80, 114, 114, 85, 125, 173, 146, 125, 246, 156, 114, 219, 85, 240, 146, 114, 193, 344, 173, 173, 219, 302, 125, 297, 156, 193, 407, 246, 219, 481, 256, 360, 193, 297, 240, 651, 231, 414, 302, 219, 114, 567, 344, 146, 548, 672, 345, 345, 173, 256, 407, 482, 302, 914, 297
Offset: 1

Views

Author

Emeric Deutsch, Jun 01 2012

Keywords

Comments

The overall second Zagreb index of any simple connected graph G is defined as the sum of the second Zagreb indices of all the subgraphs of G. The second Zagreb index of a simple connected graph G is the sum of the degree products d(i)d(j) over all edges ij of g.
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(3)=6 because the rooted tree with Matula-Goebel number 3 is the path tree with 3 vertices R - A - B ; the subtrees are R, A, B, RA, AB, and RAB with second Zagreb indices 0, 0, 0, 1, 1, and 4, respectively.
		

References

  • D. Bonchev and N. Trinajstic, Overall molecular descriptors. 3. Overall Zagreb indices, SAR and QSAR in Environmental Research, 12, 2001, 213-236.
  • 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 Y-N. 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

Programs

  • Maple
    with(numtheory): Z2 := proc (n) local r, s, a: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: a := proc (n) if n = 1 then 0 elif bigomega(n) = 1 then 1+bigomega(pi(n)) else a(r(n))+a(s(n)) end if end proc: if n = 1 then 0 elif bigomega(n) = 1 then Z2(pi(n))+a(pi(n))+bigomega(pi(n))+1 else Z2(r(n))+Z2(s(n))+a(r(n))*bigomega(s(n))+a(s(n))*bigomega(r(n)) end if end proc: m2union := proc (x, y) sort([op(x), op(y)]) end proc: with(numtheory): MRST := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then [1] elif bigomega(n) = 1 then [1, seq(ithprime(mrst[pi(n)][i]), i = 1 .. nops(mrst[pi(n)]))] else [seq(seq(mrst[r(n)][i]*mrst[s(n)][j], i = 1 .. nops(mrst[r(n)])), j = 1 .. nops(mrst[s(n)]))] end if end proc: MNRST := proc (n) local r, s: r := proc (n) options operator, arrow; op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then [] elif bigomega(n) = 1 then m2union(mrst[pi(n)], mnrst[pi(n)]) else m2union(mnrst[r(n)], mnrst[s(n)]) end if end proc: MST := proc (n) m2union(mrst[n], mnrst[n]) end proc: for n to 2000 do mrst[n] := MRST(n): mnrst[n] := MNRST(n): mst[n] := MST(n) end do: OZ2 := proc (n) options operator, arrow: add(Z2(MST(n)[j]), j = 1 .. nops(MST(n))) end proc: seq(OZ2(n), n = 1 .. 120);

Formula

A198339(n) gives the sequence of the Matula-Goebel numbers of all the subtrees of the rooted tree with Matula-Goebel number n. A196054(k) is the second Zagreb index of the rooted tree with Matula-Goebel number k.

A212623 Irregular triangle read by rows: T(n,k) is the number of independent vertex subsets with k vertices of the rooted tree with Matula-Goebel number n (n>=1, k>=0).

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Jun 01 2012

Keywords

Comments

A vertex subset in a tree is said to be independent if no pair of vertices is connected by an edge. The empty set is considered to be independent.
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.
Sum of entries in row n = A184165(n) = number of independent vertex subset (the Merrifield-Simmons index).
Sum(k*T(n,k), k>=0) = A212624(n) = number of vertices in all independent vertex subsets.
Number of entries in row n = 1 + number of vertices in the largest independent vertex subset = 1 + A212625(n).
Last entry in row n = A212626(n) = number of largest independent vertex subsets.
With the given Maple program, the command P(n) yields the generating polynomial of row n.

Examples

			Row 5 is [1,4,3] because the rooted tree with Matula-Goebel number 5 is the path tree R - A - B - C with independent vertex subsets: {}, {R}, {A}, {B}, {C}, {R,B}, {R,C}, {A,C}.
Triangle starts:
  1, 1;
  1, 2;
  1, 3, 1;
  1, 3, 1;
  1, 4, 3;
  ...
		

Crossrefs

Programs

  • Maple
    with(numtheory): A := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then [x, 1] elif bigomega(n) = 1 then [expand(x*A(pi(n))[2]), expand(A(pi(n))[1])+A(pi(n))[2]] else [sort(expand(A(r(n))[1]*A(s(n))[1]/x)), sort(expand(A(r(n))[2]*A(s(n))[2]))] end if end proc: P := proc (n) options operator, arrow: sort(A(n)[1]+A(n)[2]) end proc: for n to 35 do seq(coeff(P(n), x, k), k = 0 .. degree(P(n))) end do; % yields sequence in triangular form
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    A [n_] := Which[n == 1, {x, 1}, PrimeOmega[n] == 1, {x*A[PrimePi[n]][[2]], A[PrimePi[n]][[1]] + A[PrimePi[n]][[2]]}, True, {A[r[n]][[1]]*A[s[n]][[1]]/x, A[r[n]][[2]]*A[s[n]][[2]]}];
    P[n_] := A[n] // Total;
    T[n_] := CoefficientList[P[n], x];
    Table[T[n], {n, 1, 35}] // Flatten (* Jean-François Alcover, Jun 20 2024, after Maple code *)

Formula

Define R(n) =R(n,x) (S(n)=S(n,x)) the generating polynomial of the independent vertex subsets that contain (do not contain) the root of the rooted tree with Matula-Goebel number n. Then R(1)=x, S(1)=1, R(the t-th prime) = x*S(t), S(the t-th prime) = R(t) + S(t); R(rs) = R(r)R(s)/x, S(rs) = S(r)S(s), (r,s>=2).

A212624 Number of vertices in all independent vertex subsets of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

1, 2, 5, 5, 10, 10, 13, 13, 20, 20, 20, 23, 23, 23, 38, 33, 23, 41, 33, 45, 45, 38, 41, 55, 71, 41, 74, 48, 45, 78, 38, 81, 71, 45, 82, 92, 55, 55, 78, 105, 41, 85, 48, 82, 137, 74, 78, 131, 98, 146, 82, 85, 81, 155, 130, 108, 105, 78, 45, 173, 92, 71, 153, 193, 141, 141, 55, 98, 137, 157, 105, 212
Offset: 1

Views

Author

Emeric Deutsch, Jun 01 2012

Keywords

Comments

A vertex subset in a tree is said to be independent if no pair of vertices is connected by an edge. The empty set is considered to be independent.
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(n) = Sum_{k>=0} k*A212623(n,k).

Examples

			a(5)=10 because the rooted tree with Matula-Goebel number 5 is the path tree R - A - B - C with independent vertex subsets: {}, {R}, {A}, {B}, {C}, {R,B}, {R,C}, {A,C}. The total number of vertices is 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then [x, 1] elif bigomega(n) = 1 then [expand(x*A(pi(n))[2]), expand(A(pi(n))[1])+A(pi(n))[2]] else [sort(expand(A(r(n))[1]*A(s(n))[1]/x)), sort(expand(A(r(n))[2]*A(s(n))[2]))] end if end proc: P := proc (n) options operator, arrow: sort(A(n)[1]+A(n)[2]) end proc: a := proc (n) options operator, arrow: subs(x = 1, diff(P(n), x)) end proc: seq(a(n), n = 1 .. 100);
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    A[n_] := Which[n == 1, {x, 1}, PrimeOmega[n] == 1, {x*A[PrimePi[n]][[2]], A[PrimePi[n]][[1]] + A[PrimePi[n]][[2]]}, True, {A[r[n]][[1]]*A[s[n]][[1]]/x, A[r[n]][[2]]*A[s[n]][[2]]}];
    P[n_] := A[n] // Total;
    a[n_] := D[P[n], x] /. x -> 1;
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 20 2024, after Maple code *)

Formula

In A212623 one finds the generating polynomial P(n,x) with respect to the number of vertices of the independent vertex subsets of the rooted tree with Matula-Goebel number n. We have a(n) = subs(x=1, (d/dx)P(n,x)).
Showing 1-10 of 12 results. Next