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.

A214565 Sum(M(t)), where summation is over all rooted trees t with n vertices and M(t) is the number of ways to take apart t by sequentially removing terminal edges (see A206494).

Original entry on oeis.org

1, 1, 3, 12, 66, 426, 3392, 30412, 314994, 3622332, 46379994, 648971940, 9923253672, 163720448184, 2910558776412, 55341456735744
Offset: 1

Views

Author

Emeric Deutsch, Jul 21 2012

Keywords

Examples

			a(4) = 12 because there are four rooted trees with 4 vertices; their Matula-Goebel numbers are 5,6,7, and 8 and, consequently M(5)+M(6)+M(7)+M(8) = 1+3+2+6 = 12 (see A206494).
		

Crossrefs

Formula

Apparently, no formula is available. The example gives a hint how the first ten terms of the sequence have been computed (using Maple).

Extensions

a(11)-a(16) from Alois P. Heinz, Sep 08 2012

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

A006472 a(n) = n!*(n-1)!/2^(n-1).

Original entry on oeis.org

1, 1, 3, 18, 180, 2700, 56700, 1587600, 57153600, 2571912000, 141455160000, 9336040560000, 728211163680000, 66267215894880000, 6958057668962400000, 834966920275488000000, 113555501157466368000000, 17373991677092354304000000, 2970952576782792585984000000
Offset: 1

Views

Author

Keywords

Comments

Product of first (n-1) positive triangular numbers. - Amarnath Murthy, May 19 2002, corrected by Alex Ratushnyak, Dec 03 2013
Number of ways of transforming n distinguishable objects into n singletons via a sequence of n-1 refinements. Example: a(3)=3 because we have XYZ->X|YZ->X|Y|Z, XYZ->Y|XZ->X|Y|Z and XYZ->Z|XY->X|Y|Z. - Emeric Deutsch, Jan 23 2005
In other words, a(n) is the number of maximal chains in the lattice of set partitions of {1, ..., n} ordered by refinement. - Gus Wiseman, Jul 22 2018
From David Callan, Aug 27 2009: (Start)
With offset 0, a(n) = number of unordered increasing full binary trees of 2n edges with leaf set {n,n+1,...,2n}, where full binary means each nonleaf vertex has two children, increasing means the vertices are labeled 0,1,2,...,2n and each child is greater than its parent, unordered might as well mean ordered and each pair of sibling vertices is increasing left to right. For example, a(2)=3 counts the trees with edge lists {01,02,13,14}, {01,03,12,14}, {01,04,12,13}.
PROOF. Given such a tree of size n, to produce a tree of size n+1, two new leaves must be added to the leaf n. Choose any two of the leaf set {n+1,...,2n,2n+1,2n+2} for the new leaves and use the rest to replace the old leaves n+1,...,2n, maintaining relative order. Thus each tree of size n yields (n+2)-choose-2 trees of the next size up. Since the ratio a(n+1)/a(n)=(n+2)-choose-2, the result follows by induction.
Without the condition on the leaves, these trees are counted by the reduced tangent numbers A002105. (End)
a(n) = Sum(M(t)N(t)), where summation is over all rooted trees t with n vertices, M(t) is the number of ways to take apart t by sequentially removing terminal edges (see A206494) and N(t) is the number of ways to build up t from the one-vertex tree by adding successively edges to the existing vertices (the Connes-Moscovici weight; see A206496). See Remark on p. 3801 of the Hoffman reference. Example: a(3) = 3; indeed, there are two rooted trees with 3 vertices: t' = the path r-a-b and t" = V; we have M(t')=N(t')=1 and M(t") =1, N(t")=2, leading to M(t')N(t') + M(t")N(t")=3. - Emeric Deutsch, Jul 20 2012
Number of coalescence sequences or labeled histories for n lineages: the number of sequences by which n distinguishable leaves can coalesce to a single sequence. The coalescence process merges pairs of lineages into new lineages, labeling each newly formed lineage l by a subset of the n initial lineages corresponding to the union of all initial lineages that feed into lineage l. - Noah A Rosenberg, Jan 28 2019
Conjecture: For n > 1, n divides 2*a(n-1) + 4 if and only if n is prime. - Werner Schulte, Oct 04 2020
For a proof of the above conjecture see Himane. The list of primes p such that p^2 divides (2*a(p-1) + 4) (analog of A007540 - Wilson primes) begins [239, 24049, ...]. - Peter Bala, Nov 06 2024
a(n) is the number of maximal chains in the poset of set of permutations of {1, ..., n} ordered by containment. - Rajesh Kumar Mohapatra, Sep 03 2025

Examples

			From _Gus Wiseman_, Jul 22 2018: (Start)
The a(3) = 3 maximal chains in the lattice of set partitions of {1,2,3}:
  {{1},{2},{3}} < {{1},{2,3}} < {{1,2,3}}
  {{1},{2},{3}} < {{2},{1,3}} < {{1,2,3}}
  {{1},{2},{3}} < {{3},{1,2}} < {{1,2,3}} (End)
From _Rajesh Kumar Mohapatra_, Sep 03 2025: (Start)
The a(3) = 3 maximal chains in the poset of the set of permutations of {1,2,3}:
  {(1)(2)(3)} < (12)(3) < (123)}
  {(1)(2)(3)} < (1)(23) < (123)}
  {(1)(2)(3)} < (13)(2) < (132)} (End)
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 148.
  • László Lovász, Combinatorial Problems and Exercises, North-Holland, 1979, p. 165.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Mike Steel, Phylogeny: Discrete and Random Processes in Evolution, SIAM, 2016, p. 47.

Crossrefs

Cf. A000110, A000258, A002846, A005121, A213427, A317145, A363679 (sum of reciprocals).
For the type B and D analogs, see A001044 and A123385.

Programs

  • Magma
    [Factorial(n)*Factorial(n-1)/2^(n-1): n in [1..20]]; // Vincenzo Librandi, Aug 23 2018
    
  • Maple
    A006472 := n -> n!*(n-1)!/2^(n-1):
  • Mathematica
    FoldList[Times,1,Accumulate[Range[20]]] (* Harvey P. Dale, Jan 10 2013 *)
  • PARI
    a(n) = n*(n-1)!^2/2^(n-1) \\ Charles R Greathouse IV, May 18 2015
    
  • Python
    from math import factorial
    def A006472(n): return n*factorial(n-1)**2 >> n-1 # Chai Wah Wu, Jun 22 2022

Formula

a(n) = a(n-1)*A000217(n-1).
a(n) = A010790(n-1)/2^(n-1).
a(n) = polygorial(n, 3) = (A000142(n)/A000079(n))*A000142(n+1) = (n!/2^n)*Product_{i=0..n-1} (i+2) = (n!/2^n)*Pochhammer(2, n) = (n!^2/2^n)*(n+1) = polygorial(n, 4)/2^n*(n+1). - Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003
a(n-1) = (-1)^(n+1)/(n^2*det(M_n)) where M_n is the matrix M_(i, j) = abs(1/i - 1/j). - Benoit Cloitre, Aug 21 2003
From Ilya Gutkovskiy, Dec 15 2016: (Start)
a(n) ~ 4*Pi*n^(2*n)/(2^n*exp(2*n)).
Sum_{n>=1} 1/a(n) = BesselI(1,2*sqrt(2))/sqrt(2) = 2.3948330992734... (End)
D-finite with recurrence 2*a(n) -n*(n-1)*a(n-1)=0. - R. J. Mathar, May 02 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = BesselJ(1,2*sqrt(2))/sqrt(2). - Amiram Eldar, Jun 25 2022
From Rajesh Kumar Mohapatra, Sep 03 2025: (Start)
a(n) = A331955(n,n)
a(n) = A331956(n,n)
a(n) = A375835(n,n)
a(n) = A375837(n,n) (End)

A206496 The Connes-Moscovici weight of the rooted tree with Matula-Goebel number n. It is defined as the number of ways to build up the rooted tree from the one-vertex tree by adding successively edges to the existing vertices.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 3, 4, 1, 6, 3, 4, 10, 1, 1, 15, 1, 10, 10, 5, 3, 10, 10, 15, 15, 10, 4, 60, 1, 1, 15, 5, 20, 45, 6, 5, 45, 20, 3, 60, 4, 15, 105, 18, 10, 15, 10, 70, 15, 45, 1, 105, 35, 20, 15, 24, 1, 210, 15, 6, 105, 1, 105, 105, 1, 15, 63, 140
Offset: 1

Views

Author

Emeric Deutsch, Jul 20 2012

Keywords

Comments

See A206494 for the number of ways to take apart the rooted tree corresponding to the Matula-Goebel number n by sequentially removing terminal edges.
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(6)=3 because the rooted tree with Matula-Goebel number 6 is the path ARBC with root at R; starting with R we can obtain the tree ARBC by adding successively edges at the vertices  (i) R, R, A, or at (ii) R, R, B, or at (iii) R, A, R.
a(8)=1 because the rooted tree with Matula-Goebel number 8 is the star tree with 3 edges emanating from the root; obviously, there is only 1 way to build up this tree from the root.
		

References

  • J. C. Butcher, The Numerical Analysis of Ordinary Differential Equations, 1987, Wiley, Chichester.

Crossrefs

A139002 is a permutation of this sequence.

Programs

  • Maple
    with(numtheory): V := 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+V(pi(n)) else V(r(n))+V(s(n))-1 end if end proc: TF := 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 V(n)*TF(pi(n)) else TF(r(n))*TF(s(n))*V(n)/(V(r(n))*V(s(n))) end if end proc: SF := proc (n) if n = 1 then 1 elif nops(factorset(n)) = 1 then factorial(log[factorset(n)[1]](n))*SF(pi(factorset(n)[1]))^log[factorset(n)[1]](n) else SF(expand(op(1, ifactor(n))))*SF(expand(n/op(1, ifactor(n)))) end if end proc: a := proc (n) options operator, arrow: factorial(V(n))/(TF(n)*SF(n)) end proc: seq(a(n), n = 1 .. 120);
  • Mathematica
    V[n_] := Module[{u, v}, u = FactorInteger[#][[1, 1]]&; v = #/u[#]&; If[n == 1, 1, If[PrimeQ[n], 1 + V[PrimePi[n]], V[u[n]] + V[v[n]] - 1]]];
    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];
    TF[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, V[n]*TF[PrimePi[n]], True, TF[r[n]]*TF[s[n]]*v[n]/(v[r[n]]*v[s[n]])];
    SF[n_] := SF[n] = If[n == 1, 1, If[PrimeQ[n], SF[PrimePi[n]], Module[{p, e}, Product[{p, e} = pe; e! * SF[p]^e, {pe, FactorInteger[n]}]]]];
    a[n_] := V[n]!/(TF[n]*SF[n]);
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jun 24 2024, after Emeric Deutsch in A061775, A206493 and A206497 *)

Formula

a(n) = V(n)!/[TF(n)*SF(n)], where V denotes "number of vertices" (A061775), TF denotes "tree factorial" (A206493), and SF denotes "symmetry factor" (A206497).

A206493 Product, over all vertices v of the rooted tree with Matula-Goebel number n, of the number of vertices in the subtree with root v.

Original entry on oeis.org

1, 2, 6, 3, 24, 8, 12, 4, 20, 30, 120, 10, 40, 15, 72, 5, 60, 24, 20, 36, 36, 144, 120, 12, 252, 48, 56, 18, 180, 84, 720, 6, 336, 72, 126, 28, 60, 24, 112, 42, 240, 42, 90, 168, 192, 140, 504, 14, 63, 288, 168, 56, 30, 64, 1152, 21, 56, 210, 360, 96, 168, 840, 96, 7, 384
Offset: 1

Views

Author

Emeric Deutsch, May 10 2012

Keywords

Comments

a(n) is called tree factorial. See, for example, the Brouder reference.
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 Y; denoting the vertices in preorder by a,b,c, and d, the number of vertices of the subtrees having these roots are 4, 3, 1, and 1, respectively. a(11)=120 because the rooted tree with Matula-Goebel number 11 is the path tree on 5 vertices; the subtrees have 5,4,3,2,1 vertices.
		

Crossrefs

Cf. A196068 (sum of subtree sizes).

Programs

  • Maple
    with(numtheory): V := 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+V(pi(n)) else V(r(n))+V(s(n))-1 end if end proc: H := 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 V(n)*H(pi(n)) else H(r(n))*H(s(n))*V(n)/(V(r(n))*V(s(n))) end if end proc: seq(H(n), n = 1 .. 100);
  • 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];
    H[n_] := Which[n == 1, 1, PrimeOmega[n] == 1, V[n]*H[PrimePi[n]], True,  H[r[n]]*H[s[n]]*V[n]/(V[r[n]]*V[s[n]])];
    Table[H[n], {n, 1, 100}] (* Jean-François Alcover, Jun 24 2024, after Maple code *)
  • PARI
    \\ See links.

Formula

Denote by V(k) the number of vertices of the rooted tree with Matula-Goebel number k. If n is the m-th prime, then a(n) = a(m)*V(n); if n=rs, r,s>=2, then a(n) = a(r)a(s)V(n)/{V(r)V(s)}. The Maple program is based on these recurrence relations.
Showing 1-5 of 5 results.