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.

A291636 Matula-Goebel numbers of lone-child-avoiding rooted trees.

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 49, 56, 64, 76, 86, 98, 106, 112, 128, 133, 152, 172, 196, 212, 214, 224, 256, 262, 266, 301, 304, 326, 343, 344, 361, 371, 392, 424, 428, 448, 454, 512, 524, 526, 532, 602, 608, 622, 652, 686, 688, 722, 742, 749, 766, 784, 817
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2017

Keywords

Comments

We say that a rooted tree is lone-child-avoiding if no vertex has exactly one child.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches. This gives a bijective correspondence between positive integers and unlabeled rooted trees.
An alternative definition: n is in the sequence iff n is 1 or the product of two or more not necessarily distinct prime numbers whose prime indices already belong to the sequence. For example, 14 is in the sequence because 14 = prime(1) * prime(4) and 1 and 4 both already belong to the sequence.

Examples

			The sequence of all lone-child-avoiding rooted trees together with their Matula-Goebel numbers begins:
    1: o
    4: (oo)
    8: (ooo)
   14: (o(oo))
   16: (oooo)
   28: (oo(oo))
   32: (ooooo)
   38: (o(ooo))
   49: ((oo)(oo))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
   98: (o(oo)(oo))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  133: ((oo)(ooo))
  152: (ooo(ooo))
  172: (oo(o(oo)))
		

Crossrefs

These trees are counted by A001678.
The case with more than two branches is A331490.
Unlabeled rooted trees are counted by A000081.
Topologically series-reduced rooted trees are counted by A001679.
Labeled lone-child-avoiding rooted trees are counted by A060356.
Labeled lone-child-avoiding unrooted trees are counted by A108919.
MG numbers of singleton-reduced rooted trees are A330943.
MG numbers of topologically series-reduced rooted trees are A331489.

Programs

  • Mathematica
    nn=2000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    srQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[Length[m]>1,And@@srQ/@m]]];
    Select[Range[nn],srQ]

Extensions

Updated with corrected terminology by Gus Wiseman, Jan 20 2020

A358377 Numbers k such that the k-th standard ordered rooted tree is a generalized Bethe tree (counted by A003238).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 11, 16, 17, 32, 37, 43, 64, 128, 129, 137, 171, 256, 257, 293, 512, 529, 683, 1024, 1025, 2048, 2185, 2341, 2731, 4096, 8192, 10923, 16384, 16913, 18725, 32768, 32769, 32897, 34953, 43691, 65536, 65537, 131072, 131329, 149797, 174763
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2022

Keywords

Comments

We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.
A generalized Bethe tree is an unlabeled rooted tree where all branches directly under the same root are equal.

Examples

			The terms together with their corresponding ordered rooted trees begin:
    1: o
    2: (o)
    3: ((o))
    4: (oo)
    5: (((o)))
    8: (ooo)
    9: ((oo))
   11: ((o)(o))
   16: (oooo)
   17: ((((o))))
   32: (ooooo)
   37: (((o))((o)))
   43: ((o)(o)(o))
   64: (oooooo)
  128: (ooooooo)
  129: ((ooo))
  137: ((oo)(oo))
  171: ((o)(o)(o)(o))
		

Crossrefs

These trees are counted by A003238.
The unordered version is A214577, also counted by A003238.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.
A358374 ranks ordered identity trees, counted by A032027.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Select[Range[1000],FreeQ[srt[#],[_]?(!SameQ@@#&)]&]

A331488 Number of unlabeled lone-child-avoiding rooted trees with n vertices and more than two branches (of the root).

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 6, 10, 20, 36, 70, 134, 263, 513, 1022, 2030, 4076, 8203, 16614, 33738, 68833, 140796, 288989, 594621, 1226781, 2536532, 5256303, 10913196, 22700682, 47299699, 98714362, 206323140, 431847121, 905074333, 1899247187, 3990145833, 8392281473
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2020

Keywords

Comments

Also the number of lone-child-avoiding rooted trees with n vertices and more than two branches.

Examples

			The a(4) = 1 through a(9) = 10 trees:
  (ooo)  (oooo)  (ooooo)   (oooooo)   (ooooooo)    (oooooooo)
                 (oo(oo))  (oo(ooo))  (oo(oooo))   (oo(ooooo))
                           (ooo(oo))  (ooo(ooo))   (ooo(oooo))
                                      (oooo(oo))   (oooo(ooo))
                                      (o(oo)(oo))  (ooooo(oo))
                                      (oo(o(oo)))  (o(oo)(ooo))
                                                   (oo(o(ooo)))
                                                   (oo(oo)(oo))
                                                   (oo(oo(oo)))
                                                   (ooo(o(oo)))
		

Crossrefs

The not necessarily lone-child-avoiding version is A331233.
The Matula-Goebel numbers of these trees are listed by A331490.
A000081 counts unlabeled rooted trees.
A001678 counts lone-child-avoiding rooted trees.
A001679 counts topologically series-reduced rooted trees.
A291636 lists Matula-Goebel numbers of lone-child-avoiding rooted trees.
A331489 lists Matula-Goebel numbers of series-reduced rooted trees.

Programs

  • Mathematica
    urt[n_]:=Join@@Table[Union[Sort/@Tuples[urt/@ptn]],{ptn,IntegerPartitions[n-1]}];
    Table[Length[Select[urt[n],Length[#]>2&&FreeQ[#,{_}]&]],{n,10}]

Formula

For n > 1, a(n) = A001679(n) - A001678(n).

Extensions

a(37)-a(38) from Jinyuan Wang, Jun 26 2020
Terminology corrected (lone-child-avoiding, not series-reduced) by Gus Wiseman, May 10 2021

A358376 Numbers k such that the k-th standard ordered rooted tree is lone-child-avoiding (counted by A005043).

Original entry on oeis.org

1, 4, 8, 16, 18, 25, 32, 36, 50, 57, 64, 72, 100, 114, 121, 128, 137, 144, 200, 228, 242, 249, 256, 258, 274, 281, 288, 385, 393, 400, 456, 484, 498, 505, 512, 516, 548, 562, 569, 576, 770, 786, 793, 800, 897, 905, 912, 968, 996, 1010, 1017, 1024, 1032, 1096
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2022

Keywords

Comments

We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

Examples

			The initial terms and their corresponding trees:
    1: o
    4: (oo)
    8: (ooo)
   16: (oooo)
   18: ((oo)o)
   25: (o(oo))
   32: (ooooo)
   36: ((oo)oo)
   50: (o(oo)o)
   57: (oo(oo))
   64: (oooooo)
   72: ((oo)ooo)
  100: (o(oo)oo)
  114: (oo(oo)o)
  121: (ooo(oo))
  128: (ooooooo)
  137: ((oo)(oo))
  144: ((oo)oooo)
  200: (o(oo)ooo)
		

Crossrefs

These trees are counted by A005043.
The series-reduced case appears to be counted by A284778.
The unordered version is A291636, counted by A001678.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.
A358374 ranks ordered identity trees, counted by A032027.
A358375 ranks ordered binary trees, counted by A126120.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Select[Range[100],FreeQ[srt[#],[_]?(Length[#]==1&)]&]

A331489 Matula-Goebel numbers of topologically series-reduced rooted trees.

Original entry on oeis.org

1, 2, 7, 8, 16, 19, 28, 32, 43, 53, 56, 64, 76, 98, 107, 112, 128, 131, 152, 163, 172, 196, 212, 224, 227, 256, 263, 266, 304, 311, 343, 344, 383, 392, 424, 428, 443, 448, 512, 521, 524, 532, 577, 602, 608, 613, 652, 686, 688, 719, 722, 742, 751, 784, 848, 856
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2020

Keywords

Comments

We say that a rooted tree is topologically series-reduced if no vertex (including the root) has degree 2.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches. This gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of all topologically series-reduced rooted trees together with their Matula-Goebel numbers begins:
    1: o
    2: (o)
    7: ((oo))
    8: (ooo)
   16: (oooo)
   19: ((ooo))
   28: (oo(oo))
   32: (ooooo)
   43: ((o(oo)))
   53: ((oooo))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   98: (o(oo)(oo))
  107: ((oo(oo)))
  112: (oooo(oo))
  128: (ooooooo)
  131: ((ooooo))
  152: (ooo(ooo))
  163: ((o(ooo)))
		

Crossrefs

Unlabeled rooted trees are counted by A000081.
Topologically series-reduced trees are counted by A000014.
Topologically series-reduced rooted trees are counted by A001679.
Labeled topologically series-reduced trees are counted by A005512.
Labeled topologically series-reduced rooted trees are counted by A060313.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.

Programs

  • Mathematica
    nn=1000;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    srQ[n_]:=Or[n==1,With[{m=primeMS[n]},And[Length[m]>1,And@@srQ/@m]]];
    Select[Range[nn],PrimeOmega[#]!=2&&And@@srQ/@primeMS[#]&]

A331578 Number of labeled series-reduced rooted trees with n vertices and more than two branches of the root.

Original entry on oeis.org

0, 0, 0, 4, 5, 186, 847, 17928, 166833, 3196630, 45667391, 925287276, 17407857337, 393376875906, 8989368580935, 229332484742416, 6094576250570849, 174924522900914094, 5271210321949744111, 168792243040279327860, 5674164658298121248361, 200870558472768096534490
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2020

Keywords

Comments

A rooted tree is series-reduced if no vertex (including the root) has degree 2.
Also labeled lone-child-avoiding rooted trees with n vertices and more than two branches, where a rooted tree is lone-child-avoiding if no vertex has exactly one child.

Examples

			Non-isomorphic representatives of the a(7) = 847 trees (in the format root[branches]) are:
  1[2,3,4[5,6,7]]
  1[2,3,4,5[6,7]]
  1[2,3,4,5,6,7]
		

Crossrefs

The non-series-reduced version is A331577.
The unlabeled version is A331488.
Lone-child-avoiding rooted trees are counted by A001678.
Topologically series-reduced rooted trees are counted by A001679.
Labeled topologically series-reduced rooted trees are counted by A060313.
Labeled lone-child-avoiding rooted trees are counted by A060356.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.
Matula-Goebel numbers of series-reduced rooted trees are A331489.

Programs

  • Mathematica
    lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]];
    Table[Length[Select[lrt[Range[n]],Length[#]>2&&FreeQ[#,[]]&]],{n,6}]
  • PARI
    a(n) = {if(n<=1, 0, sum(k=1, n, (-1)^(n-k)*k^(k-2)*n*(n-2)!*binomial(n-1,k-1)*(2*k*n - n - k^2)/k!))} \\ Andrew Howroyd, Dec 09 2020
    
  • PARI
    seq(n)={my(w=lambertw(-x/(1+x) + O(x*x^n))); Vec(serlaplace(-x - w - (x/2)*w^2), -n)} \\ Andrew Howroyd, Dec 09 2020

Formula

From Andrew Howroyd, Dec 09 2020: (Start)
a(n) = A060313(n) - n*A060356(n-1) for n > 1.
a(n) = Sum_{k=1..n} (-1)^(n-k)*k^(k-2)*n*(n-2)!*binomial(n-1,k-1)*(2*k*n - n - k^2)/k! for n > 1.
E.g.f.: -x - LambertW(-x/(1+x)) - (x/2)*LambertW(-x/(1+x))^2.
(End)

Extensions

Terms a(9) and beyond from Andrew Howroyd, Dec 09 2020

A331233 Number of unlabeled rooted trees with n vertices and more than two branches of the root.

Original entry on oeis.org

0, 0, 0, 1, 2, 5, 12, 30, 75, 194, 501, 1317, 3485, 9302, 24976, 67500, 183290, 500094, 1369939, 3766831, 10391722, 28756022, 79794407, 221987348, 619019808, 1729924110, 4844242273, 13590663071, 38195831829, 107523305566, 303148601795, 855922155734, 2419923253795
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2020

Keywords

Examples

			The a(4) = 1 through a(7) = 12 rooted trees:
  (ooo)  (oooo)   (ooooo)    (oooooo)
         (oo(o))  (oo(oo))   (oo(ooo))
                  (ooo(o))   (ooo(oo))
                  (o(o)(o))  (oooo(o))
                  (oo((o)))  (o(o)(oo))
                             (oo((oo)))
                             (oo(o)(o))
                             (oo(o(o)))
                             (ooo((o)))
                             ((o)(o)(o))
                             (o(o)((o)))
                             (oo(((o))))
		

Crossrefs

The Matula-Goebel numbers of these trees are given by A033942.
The series-reduced case is A331488.
The lone-child-avoiding case is (also) A331488.
The labeled version is A331577.
Unlabeled rooted trees are counted by A000081.

Programs

  • Maple
    g:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
          `if`(i<1, 0, add(binomial(g(i-1$2, 0)+j-1, j)*
             g(n-i*j, i-1, max(0, t-j)), j=0..n/i)))
        end:
    a:= n-> g(n-1$2, 3):
    seq(a(n), n=1..40);  # Alois P. Heinz, Jan 22 2020
  • Mathematica
    urt[n_]:=Join@@Table[Union[Sort/@Tuples[urt/@ptn]],{ptn,IntegerPartitions[n-1]}];
    Table[Length[Select[urt[n],Length[#]>2&]],{n,10}]
    (* Second program: *)
    g[n_, i_, t_] := g[n, i, t] = If[n == 0, If[t == 0, 1, 0],
         If[i < 1, 0, Sum[Binomial[g[i - 1, i - 1, 0] + j - 1, j]*
         g[n - i*j, i - 1, Max[0, t - j]], {j, 0, n/i}]]];
    a[n_] := g[n-1, n-1, 3];
    Array[a, 40] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)
  • PARI
    \\ TreeGf gives gf of A000081.
    TreeGf(N)={my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    seq(n)={my(g=TreeGf(n)); Vec(g - x*(1 + g + (g^2 + subst(g, x, x^2))/2), -n)} \\ Andrew Howroyd, Jan 22 2020

Formula

For n > 1, a(n) = Sum_{k > 2} A033185(n - 1, k).
G.f.: f(x) - x*(1 + f(x) + (f(x)^2 + f(x^2))/2) where f(x) is the g.f. of A000081. - Andrew Howroyd, Jan 22 2020

A331577 Number of labeled rooted trees with n vertices and more than two branches of the root.

Original entry on oeis.org

0, 0, 0, 4, 65, 1026, 17857, 349224, 7657281, 186895270, 5037424601, 148805552556, 4784793219505, 166458635341194, 6231891513395745, 249886992888096976, 10686839817678846209, 485632267141865950926, 23370062118676064101801, 1187393725239246382405140
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2020

Keywords

Examples

			Non-isomorphic representatives of the a(6) = 1026 trees (in the format root[branches]) are:
  1[2,3,4[5[6]]]
  1[2,3[4],5[6]]
  1[2,3,4[5,6]]
  1[2,3,4,5[6]]
  1[2,3,4,5,6]
		

Crossrefs

The series-reduced version is A331578.
The unlabeled version is A331233.
Labeled rooted trees are counted by A000169.

Programs

  • Mathematica
    lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]];
    Table[Length[Select[lrt[Range[n]],Length[#]>2&]],{n,6}]
  • PARI
    seq(n)={my(f=serreverse(x*exp(O(x^n) -x ))); Vec(serlaplace(f - x*(1 + f + f^2/2)), -n)} \\ Andrew Howroyd, Jan 23 2020

Formula

For n > 1, a(n) = Sum_{k > 2} A206429(n, k).
E.g.f.: f(x) - x*(1 + f(x) + f(x)^2/2), where f(x) is the e.g.f. of A000169. - Andrew Howroyd, Jan 23 2020
Showing 1-8 of 8 results.