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 13 results. Next

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

A303431 Aperiodic tree numbers. Matula-Goebel numbers of aperiodic rooted trees.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 11, 12, 13, 15, 18, 20, 22, 24, 26, 29, 30, 31, 33, 37, 39, 40, 41, 44, 45, 47, 48, 50, 52, 54, 55, 58, 60, 61, 62, 65, 66, 71, 72, 74, 75, 78, 79, 80, 82, 87, 88, 89, 90, 93, 94, 96, 99, 101, 104, 108, 109, 110, 111, 113, 116, 117, 120, 122
Offset: 1

Views

Author

Gus Wiseman, Apr 23 2018

Keywords

Comments

A positive integer is an aperiodic tree number iff either it is equal to 1 or it belongs to A007916 (numbers that are not perfect powers, or numbers whose prime multiplicities are relatively prime) and all of its prime indices are also aperiodic tree numbers, where a prime index of n is a number m such that prime(m) divides n.

Examples

			Sequence of aperiodic rooted trees begins:
01 o
02 (o)
03 ((o))
05 (((o)))
06 (o(o))
10 (o((o)))
11 ((((o))))
12 (oo(o))
13 ((o(o)))
15 ((o)((o)))
18 (o(o)(o))
20 (oo((o)))
22 (o(((o))))
24 (ooo(o))
26 (o(o(o)))
29 ((o((o))))
30 (o(o)((o)))
31 (((((o)))))
33 ((o)(((o))))
		

Crossrefs

Programs

  • Mathematica
    zapQ[1]:=True;zapQ[n_]:=And[GCD@@FactorInteger[n][[All,2]]===1,And@@zapQ/@PrimePi/@FactorInteger[n][[All,1]]];
    Select[Range[100],zapQ]

A291443 Number of leaf-balanced trees with n nodes.

Original entry on oeis.org

1, 1, 2, 4, 8, 14, 25, 41, 70, 116, 198, 331, 568, 957, 1635, 2776, 4757, 8144, 14089, 24428, 42707, 74895, 131983, 232895, 411725, 727434, 1284809, 2265997, 3992154, 7023718, 12347202, 21690274, 38096244, 66915426, 117591030, 206791336, 364037186, 641690280
Offset: 1

Views

Author

Gus Wiseman, Aug 23 2017

Keywords

Comments

An unlabeled rooted tree is leaf-balanced if every branch has the same number of leaves and every non-leaf rooted subtree is also leaf-balanced.

Examples

			The a(5)=8 leaf-balanced trees are: ((((o)))), (((oo))), ((o(o))), ((ooo)), (o((o))), ((o)(o)), (oo(o)), (oooo). The tree (o(oo)) is not leaf-balanced.
		

Crossrefs

Programs

  • Mathematica
    allbal[n_]:=allbal[n]=If[n===1,{{}},Join@@Function[c,Select[Union[Sort/@Tuples[allbal/@c]],SameQ@@(Count[#,{},{0,Infinity}]&/@#)&]]/@IntegerPartitions[n-1]];
    Table[Length[allbal[n]],{n,15}]
  • PARI
    PartitionProduct(p,f)={my(r=1,k=0); for(i=1,length(p), if(i==length(p) || p[i]!=p[i+1], r*=f(p[i],i-k);k=i)); r}
    UPick(total,kinds)=binomial(total+kinds-1,kinds-1);
    D(n)={my(v=vector(n)); v[1]=[1]; for(n=2, n, v[n]=vector(n-1); forpart(p=n-1, for(leaves=1, length(v[p[1]]), v[n][leaves*length(p)]+=PartitionProduct(p,(t,e)->UPick(e,v[t][leaves]))))); v}
    a(n)=vecsum(D(n)[n]); \\ Andrew Howroyd, Sep 02 2017

Extensions

Terms a(26) and beyond from Andrew Howroyd, Sep 02 2017

A291441 Matula-Goebel numbers of orderless same-trees with all leaves equal to 1.

Original entry on oeis.org

1, 4, 8, 16, 32, 49, 64, 128, 256, 343, 361, 512, 1024, 2048, 2401, 2809, 4096, 6859, 8192, 12031, 16384, 16807, 17161, 32768, 51529, 65536, 96721, 117649, 130321, 131072, 148877, 262144, 516961, 524288, 637643, 718099, 757907, 823543, 1048576, 2097152, 2248091
Offset: 1

Views

Author

Gus Wiseman, Aug 23 2017

Keywords

Comments

See A289078 for the definition of orderless same-tree.

Examples

			a(20)=12031 corresponds to the following same-tree: {{1,1,1,1},{{1,1},{1,1}}}.
		

Crossrefs

Programs

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

Extensions

More terms from Jinyuan Wang, Jun 21 2020

A298120 Matula-Goebel numbers of rooted trees in which all positive outdegrees are odd.

Original entry on oeis.org

1, 2, 3, 5, 8, 11, 12, 18, 19, 20, 27, 30, 31, 32, 37, 44, 45, 48, 50, 61, 66, 67, 71, 72, 75, 76, 80, 99, 103, 108, 110, 113, 114, 120, 124, 125, 127, 128, 131, 148, 157, 162, 165, 171, 176, 180, 186, 190, 192, 193, 197, 200, 222, 223, 229, 242, 243, 244, 264
Offset: 1

Views

Author

Gus Wiseman, Jan 12 2018

Keywords

Examples

			Sequence of trees begins:
1  o
2  (o)
3  ((o))
5  (((o)))
8  (ooo)
11 ((((o))))
12 (oo(o))
18 (o(o)(o))
19 ((ooo))
20 (oo((o)))
27 ((o)(o)(o))
30 (o(o)((o)))
31 (((((o)))))
32 (ooooo)
37 ((oo(o)))
44 (oo(((o))))
45 ((o)(o)((o)))
48 (oooo(o))
50 (o((o))((o)))
		

Crossrefs

Programs

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

A297571 Matula-Goebel numbers of fully unbalanced rooted trees.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 11, 13, 15, 22, 26, 29, 30, 31, 33, 39, 41, 47, 55, 58, 62, 65, 66, 78, 79, 82, 87, 93, 94, 101, 109, 110, 113, 123, 127, 130, 137, 141, 145, 155, 158, 165, 167, 174, 179, 186, 195, 202, 205, 211, 218, 226, 235, 237, 246, 254, 257, 271, 274
Offset: 1

Views

Author

Gus Wiseman, Dec 31 2017

Keywords

Comments

An unlabeled rooted tree is fully unbalanced if either (1) it is a single node, or (2a) every branch has a different number of nodes and (2b) every branch is fully unbalanced also. The number of fully unbalanced trees with n nodes is A032305(n).
The first finitary number (A276625) not in this sequence is 143.

Examples

			Sequence of fully unbalanced trees begins:
   1 o
   2 (o)
   3 ((o))
   5 (((o)))
   6 (o(o))
  10 (o((o)))
  11 ((((o))))
  13 ((o(o)))
  15 ((o)((o)))
  22 (o(((o))))
  26 (o(o(o)))
  29 ((o((o))))
  30 (o(o)((o)))
  31 (((((o)))))
  33 ((o)(((o))))
  39 ((o)(o(o)))
  41 (((o(o))))
  47 (((o)((o))))
		

Crossrefs

Programs

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

A304173 Number of rooted plane trees where every branch that has a predecessor (a branch directly to its left and emanating from the same root) has at least as many leaves as its predecessor.

Original entry on oeis.org

1, 1, 2, 5, 13, 34, 90, 242, 660, 1822, 5085, 14333, 40759, 116817, 337140, 979098, 2859439, 8393113, 24747052, 73262246, 217681621, 648939319, 1940461444, 5818595438, 17492367097, 52712114792, 159193762250, 481754196170, 1460650624068, 4436422703787, 13496947320929
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2018

Keywords

Examples

			The a(5) = 13 plane trees:
  ((((o)))), (((oo))), (((o)o)), ((o(o))), ((ooo)),
  (((o))o), (o((o))), (o(oo)), ((o)(o)),
  ((o)oo), (o(o)o), (oo(o)),
  (oooo).
Missing from this list is ((oo)o).
		

Crossrefs

Programs

  • Mathematica
    pplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[pplane/@c],OrderedQ[Count[#,{},{0,Infinity}]&/@#]&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[pplane[n]],{n,10}]
  • PARI
    seq(n)={my(p=x*y+O(x^2)); for(n=2, n, p=x*(y-1 + 1/prod(k=1, n-1, 1 - y^k*polcoef(p,k,y)))); Vec(subst(p,y,1))} \\ Andrew Howroyd, Jan 22 2021

Formula

G.f.: A(x,1) where A(x,y) satisfies A(x,y) = x*(y-1 + 1/(Product_{k>=1} 1 - y^k * [y^k] A(x,y))). - Andrew Howroyd, Jan 22 2021

Extensions

Terms a(15) and beyond from Andrew Howroyd, Jan 22 2021

A304175 Number of leaf-balanced rooted plane trees with n nodes.

Original entry on oeis.org

1, 1, 2, 5, 12, 27, 59, 128, 277, 597, 1280, 2730, 5794, 12248, 25836, 54508, 115222, 244144, 518104, 1099499, 2330326, 4930089, 10415135, 21992400, 46470911, 98353146, 208580686, 443186181, 942988423, 2007981801, 4276830431, 9109431322, 19404918449, 41357252072, 88236092543
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2018

Keywords

Comments

A rooted plane tree is leaf-balanced if every branch of the root has the same number of leaves, and every branch of the root is itself leaf-balanced.

Examples

			The a(5) = 12 leaf-balanced plane trees:
  ((((o)))), (((oo))), (((o)o)), ((o(o))), ((ooo)),
  (((o))o), (o((o))), ((o)(o)),
  ((o)oo), (o(o)o), (oo(o)),
  (oooo).
Missing from this list are ((oo)o) and (o(oo)).
		

Crossrefs

Programs

  • Mathematica
    lbplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[lbplane/@c],SameQ@@(Count[#,{},{0,Infinity}]&/@#)&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[lbplane[n]],{n,10}]
  • PARI
    seq(n)={my(v=vector(n)); v[1]=x/(1-x) + O(x*x^n); for(k=2, n, v[k]=x*sumdiv(k, d, if(dAndrew Howroyd, Dec 13 2020

Extensions

Terms a(17) and beyond from Andrew Howroyd, Dec 13 2020

A298536 Matula-Goebel numbers of rooted trees such that every branch of the root has a different number of leaves.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 14, 17, 19, 21, 23, 26, 29, 31, 34, 35, 37, 38, 39, 41, 43, 46, 47, 51, 53, 57, 58, 59, 61, 65, 67, 69, 71, 73, 74, 77, 79, 82, 83, 85, 86, 87, 89, 94, 95, 97, 101, 103, 106, 107, 109, 111, 113, 115, 118, 122, 123, 127, 129, 131, 133
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2018

Keywords

Examples

			Sequence of trees begins:
1  o
2  (o)
3  ((o))
5  (((o)))
7  ((oo))
11 ((((o))))
13 ((o(o)))
14 (o(oo))
17 (((oo)))
19 ((ooo))
21 ((o)(oo))
23 (((o)(o)))
26 (o(o(o)))
29 ((o((o))))
31 (((((o)))))
34 (o((oo)))
35 (((o))(oo))
37 ((oo(o)))
38 (o(ooo))
39 ((o)(o(o)))
41 (((o(o))))
43 ((o(oo)))
46 (o((o)(o)))
47 (((o)((o))))
		

Crossrefs

Programs

  • Mathematica
    nn=2000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    leafcount[n_]:=If[n===1,1,With[{m=primeMS[n]},If[Length[m]===1,leafcount[First[m]],Total[leafcount/@m]]]];
    Select[Range[nn],UnsameQ@@leafcount/@primeMS[#]&]

A298126 Matula-Goebel numbers of rooted trees in which all outdegrees are even.

Original entry on oeis.org

1, 4, 14, 16, 49, 56, 64, 86, 106, 196, 224, 256, 301, 344, 371, 424, 454, 526, 622, 686, 784, 886, 896, 1024, 1154, 1204, 1376, 1484, 1589, 1696, 1816, 1841, 1849, 2104, 2177, 2279, 2386, 2401, 2488, 2744, 2809, 2846, 3101, 3136, 3238, 3544, 3584, 3986, 4039
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2018

Keywords

Examples

			Sequence of trees begins:
1   o
4   (oo)
14  (o(oo))
16  (oooo)
49  ((oo)(oo))
56  (ooo(oo))
64  (oooooo)
86  (o(o(oo)))
106 (o(oooo))
196 (oo(oo)(oo))
224 (ooooo(oo))
256 (oooooooo)
301 ((oo)(o(oo)))
344 (ooo(o(oo)))
371 ((oo)(oooo))
424 (ooo(oooo))
454 (o((oo)(oo)))
526 (o(ooo(oo)))
622 (o(oooooo))
686 (o(oo)(oo)(oo))
784 (oooo(oo)(oo))
886 (o(o(o(oo))))
896 (ooooooo(oo))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    etQ[n_]:=Or[n===1,With[{m=primeMS[n]},EvenQ@Length@m&&And@@etQ/@m]];
    Select[Range[10000],etQ]
Showing 1-10 of 13 results. Next