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-5 of 5 results.

A193403 Triangle read by rows: row n contains the coefficients (of the increasing powers of the variable x) of the matching polynomial of the rooted tree having Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Feb 12 2012

Keywords

Comments

Row n contains 1+A061775(n) entries (= 1 + number of vertices of the rooted tree).
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.
After activating the Maple program, the command mm(n) will yield the matching polynomial of the rooted tree corresponding to the Matula-Goebel number n.

References

  • C. D. Godsil, Algebraic Combinatorics, Chapman & Hall, New York, 1993.

Crossrefs

Programs

  • Maple
    with(numtheory): N := 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+N(pi(n)) else N(r(n))+N(s(n))-1 end if end proc: M := 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, 1] elif bigomega(n) = 1 then [x*M(pi(n))[2], M(pi(n))[1]+M(pi(n))[2]] else [M(r(n))[1]*M(s(n))[2]+M(r(n))[2]*M(s(n))[1], M(r(n))[2]*M(s(n))[2]] end if end proc: m := proc (n) options operator, arrow: sort(expand(M(n)[1]+M(n)[2])) end proc: mm := proc (n) options operator, arrow: sort(expand(x^N(n)*subs(x = -1/x^2, m(n)))) end proc: for n to 19 do seq(coeff(mm(n), x, j), j = 0 .. N(n)) end do; # yields sequence in triangular form
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    V[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, 1 + V[PrimePi[n]], True,  V[r[n]] + V[s[n]] - 1];
    M[n_] := Which[n == 1, {0, 1}, PrimeOmega[n] == 1, {x*M[PrimePi[n]][[2]], M[PrimePi[n]][[1]] + M[PrimePi[n]][[2]]}, True, {M[r[n]][[1]]*M[s[n]][[2]] + M[r[n]][[2]]*M[s[n]][[1]], M[r[n]][[2]]*M[s[n]][[2]]}];
    m[n_] := M[n] // Total;
    mm[n_] := x^V[n]*(m[n] /. x -> -1/x^2);
    T[n_] := CoefficientList[mm[n], x];
    Table[T[n], {n, 1, 19}] // Flatten (* Jean-François Alcover, Jun 21 2024, after Maple code *)
  • Sage
    def M(n) :
        if n == 1 : return [0, 1, 1]
        if 1 == sloane.A001222(n) : # bigomega
            mpi = M(prime_pi(n))
            return [x*mpi[1], mpi[0]+mpi[1], 1+mpi[2]]
        r = max(prime_divisors(n)); mr = M(r); ms = M(n//r)
        return [mr[0]*ms[1]+mr[1]*ms[0],mr[1]*ms[1],mr[2]+ms[2]-1]
    def A193403_coeffs(n) :
        mn = M(n)
        q = (mn[0]+mn[1]).subs(x=-1/x^2)
        p = expand(x^mn[2]*q)
        return coefficient_list(p, x)
    for n in (1..19) : print(A193403_coeffs(n))  # Peter Luschny, Feb 12 2012

Formula

Define b(n) (c(n)) to be the generating polynomials of the matchings of the rooted tree with Matula-Goebel number n that contain (do not contain) the root, with respect to the size of the matching. We have the following recurrence for the pair M(n)=[b(n),c(n)]. M(1)=[0,1]; if n=prime(t) (=the t-th prime), then M(n)=[xc(t),b(t)+c(t)]; if n=r*s (r,s,>=2), then M(n)=[b(r)*c(s)+c(r)*b(s), c(r)*c(s)]. Then m(n)=b(n)+c(n) is the generating polynomial of the matchings of the rooted tree with respect to the size of the matchings (a modified matching polynomial). The actual matching polynomial is obtained by the substitution x = -1/x^2, followed by multiplication by x^N(n), where N(n) is the number of vertices of the rooted tree.

A347967 Number of maximum matchings in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Kevin Ryde, Sep 22 2021

Keywords

Crossrefs

Cf. A206483 (matching number), A202853 (matchings by size), A347966 (maximal matchings), A193404 (all matchings).

Programs

  • PARI
    \\ See links.

Formula

a(n) = A202853(n, A206483(n)), being the end-most term of row n of A202853.

A193404 Number of matchings (independent edge subsets) in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

1, 2, 3, 3, 5, 5, 4, 4, 8, 8, 8, 7, 7, 7, 13, 5, 7, 12, 5, 11, 11, 13, 12, 9, 21, 12, 20, 10, 11, 19, 13, 6, 21, 11, 18, 16, 9, 9, 19, 14, 12, 17, 10, 18, 32, 20, 19, 11, 15, 30, 18, 17, 6, 28, 34, 13, 14, 19, 11, 25, 16, 21, 28, 7, 31, 31, 9, 15, 32, 27, 14
Offset: 1

Views

Author

Emeric Deutsch, Feb 11 2012

Keywords

Comments

A matching in a graph is a set of edges, no two of which have a vertex in common. The empty set is considered to be a matching.
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)=3 because the rooted tree with Matula-Goebel number 3 is the path ABC on 3 vertices; it has 3 matchings: empty, {AB}, {BC}.
		

Crossrefs

Cf. A202853 (by size), A347966 (maximal), A347967 (maximum).
Cf. A184165 (independent vertex sets).

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 [0, 1] elif bigomega(n) = 1 then [A(pi(n))[2], A(pi(n))[1]+A(pi(n))[2]] else [A(r(n))[1]*A(s(n))[2]+A(s(n))[1]*A(r(n))[2], A(r(n))[2]*A(s(n))[2]] end if end proc: a := proc (n) options operator, arrow: A(n)[1]+A(n)[2] end proc: seq(a(n), n = 1 .. 80);
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    A[n_] := Which[n == 1, {0, 1}, PrimeOmega[n] == 1, {A[PrimePi[n]][[2]], A[PrimePi[n]][[1]] + A[PrimePi[n]][[2]]}, True, {A[r[n]][[1]]* A[s[n]][[2]] + A[s[n]][[1]]*A[r[n]][[2]], A[r[n]][[2]]*A[s[n]][[2]]}];
    a[n_] := Total[A[n]];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jun 25 2024, after Maple code *)

Formula

Define b(n) (c(n)) to be the number of matchings of the rooted tree with Matula-Goebel number n that contain (do not contain) the root. We have the following recurrence for the pair A(n)=[b(n),c(n)]. A(1)=[0,1]; if n=prime(t), then A(n)=[c(t),b(t)+c(t)]; if n=r*s (r,s,>=2), then A(n)=[b(r)*c(s)+c(r)*b(s), c(r)c(s)]. Clearly, a(n)=b(n)+c(n). See the Czabarka et al. reference (p. 3315, (2)). The Maple program is based on this recursive formula.

A206483 The matching number of the rooted tree having Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Feb 14 2012

Keywords

Comments

A matching in a graph is a set of edges, no two of which have a vertex in common. The matching number of a graph is the maximum of the cardinalities of all the matchings in the graph. Consequently, the matching number of a graph is the degree of the matching-generating polynomial of the graph (see the MathWorld link).
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.
After activating the Maple program, which yields the sequence, the command m(n) will yield the matching-generating polynomial of the rooted tree corresponding to the Matula-Goebel number n.

Examples

			a(11)=2 because the rooted tree corresponding to n=11 is a path abcde on 5 vertices. We have matchings with 2 edges (for example, (ab, cd)) but not with 3 edges.
		

References

  • C. D. Godsil, Algebraic Combinatorics, Chapman & Hall, New York, 1993.

Crossrefs

Cf. A202853.

Programs

  • Maple
    with(numtheory): N := 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+N(pi(n)) else N(r(n))+N(s(n))-1 end if end proc: M := 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, 1] elif bigomega(n) = 1 then [x*M(pi(n))[2], M(pi(n))[1]+M(pi(n))[2]] else [M(r(n))[1]*M(s(n))[2]+M(r(n))[2]*M(s(n))[1], M(r(n))[2]*M(s(n))[2]] end if end proc: m := proc (n) options operator, arrow: sort(expand(M(n)[1]+M(n)[2])) end proc: seq(degree(m(n)), n = 1 .. 110);
  • Mathematica
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    V[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, 1 + V[PrimePi[n]], True, V[r[n]] + V[s[n]] - 1];
    M[n_] := M[n] = Which[n == 1, {0, 1}, PrimeOmega[n] == 1, {x*M[PrimePi[n]][[2]], M[PrimePi[n]][[1]] + M[PrimePi[n]][[2]]}, True, {M[r[n]][[1]]* M[s[n]][[2]] + M[r[n]][[2]]*M[s[n]][[1]], M[r[n]][[2]]*M[s[n]][[2]]}];
    m[n_] := Total[M[n]] // Expand;
    a[n_] := Exponent[m[n], x];
    Table[a[n], {n, 1, 110}] (* Jean-François Alcover, Jun 24 2024, after Maple code *)

Formula

Define b(n) (c(n)) to be the generating polynomials of the matchings of the rooted tree with Matula-Goebel number n that contain (do not contain) the root, with respect to the size of the matching (a k-matching has size k). We have the following recurrence for the pair M(n)=[b(n),c(n)]. M(1)=[0,1]; if n=prime(t), then M(n)=[xc(t),b(t)+c(t)]; if n=r*s (r,s,>=2), then M(n)=[b(r)*c(s)+c(r)*b(s), c(r)*c(s)]. Then m(n)=b(n)+c(n) is the generating polynomial of the matchings of the rooted tree with respect to the size of the matchings (called the matching-generating polynomial). The matching number is the degree of this polynomial.

A202854 The Matula-Göbel numbers of rooted trees T for which the sequence formed by the number of k-matchings of T (k=0,1,2,...) is palindromic.

Original entry on oeis.org

1, 2, 5, 6, 18, 23, 26, 41, 54, 78, 103, 122, 162, 167, 202, 234, 283, 338, 366, 419, 486, 502, 547, 606, 643, 702, 794, 1009, 1014, 1093, 1098, 1346, 1458, 1506, 1543, 1586, 1597, 1818, 1906, 1999, 2106, 2371, 2382, 2462, 2626, 2719, 2962
Offset: 1

Views

Author

Emeric Deutsch, Feb 14 2012

Keywords

Comments

Alternatively, the Matula-Göbel numbers of rooted trees for which the matching-generating polynomial is palindromic.
A k-matching in a graph is a set of k edges, no two of which have a vertex in common.
The Matula-Göbel 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-Göbel numbers of the m branches of T.
After activating the Maple program, the command m(n) will yield the matching-generating polynomial of the rooted tree having Matula-Göbel number n.
The given Maple program gives the required Matula-Göbel numbers up to L=200 (adjustable).

Examples

			5 is in the sequence because the corresponding rooted tree is a path abcd on 4 vertices. We have 1 0-matching (the empty set), 3 1-matchings (ab), (bc), (cd), and 1 2-matchings (ab, cd). The sequence 1,3,1 is palindromic.
		

References

  • C. D. Godsil, Algebraic Combinatorics, Chapman & Hall, New York, 1993.

Crossrefs

Cf. A202853.

Programs

  • Maple
    L := 200: with(numtheory): N := 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+N(pi(n)) else N(r(n))+N(s(n))-1 end if end proc: M := 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, 1] elif bigomega(n) = 1 then [x*M(pi(n))[2], M(pi(n))[1]+M(pi(n))[2]] else [M(r(n))[1]*M(s(n))[2]+M(r(n))[2]*M(s(n))[1], M(r(n))[2]*M(s(n))[2]] end if end proc: m := proc (n) options operator, arrow: sort(expand(M(n)[1]+M(n)[2])) end proc: PAL := {}: for n to L do if m(n) = numer(subs(x = 1/x, m(n))) then PAL := `union`(PAL, {n}) else  end if end do: PAL;
  • Mathematica
    L = 3000;
    r[n_] := FactorInteger[n][[1, 1]];
    s[n_] := n/r[n];
    V[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, 1 + V[PrimePi[n]], True, V[r[n]] + V[s[n]] - 1];
    M[n_] := M[n] = Which[n == 1, {0, 1}, PrimeOmega[n] == 1, {x*M[PrimePi[n]][[2]], M[PrimePi[n]][[1]] + M[PrimePi[n]][[2]]}, True, {M[r[n]][[1]]* M[s[n]][[2]] + M[r[n]][[2]]*M[s[n]][[1]], M[r[n]][[2]]*M[s[n]][[2]]}];
    m[n_] := Total[M[n]] // Expand;
    PAL = {};
    Do[If [m[n] == Numerator[Together[m[n] /. x -> 1/x]], PAL = Union[PAL, {n}]], {n, 1, L}];
    PAL (* Jean-François Alcover, Jun 24 2024, after Maple code *)

Formula

Define b(n) (c(n)) to be the generating polynomials of the matchings of the rooted tree with Matula-Göbel number n that contain (do not contain) the root, with respect to the size of the matching. We have the following recurrence for the pair M(n)=[b(n),c(n)]. M(1)=[0,1]; if n=prime(t), then M(n)=[xc(t),b(t)+c(t)]; if n=r*s (r,s,>=2), then M(n)=[b(r)*c(s)+c(r)*b(s), c(r)*c(s)]. Then m(n)=b(n)+c(n) is the generating polynomial of the matchings of the rooted tree with respect to the size of the matchings (called matching-generating polynomial). [The actual matching polynomial is obtained by the substitution x = -1/x^2, followed by multiplication by x^N(n), where N(n) is the number of vertices of the rooted tree.]
Showing 1-5 of 5 results.