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

A111299 Numbers whose Matula tree is a binary tree (i.e., root has degree 2 and all nodes except root and leaves have degree 3).

Original entry on oeis.org

4, 14, 49, 86, 301, 454, 886, 1589, 1849, 3101, 3986, 6418, 9761, 13766, 13951, 19049, 22463, 26798, 31754, 48181, 51529, 57026, 75266, 85699, 93793, 100561, 111139, 128074, 137987, 196249, 199591, 203878, 263431, 295969, 298154, 302426, 426058, 448259, 452411
Offset: 1

Views

Author

Keith Briggs, Nov 02 2005

Keywords

Comments

This sequence should probably start with 1. Then a number k is in the sequence iff k = 1 or k = prime(x) * prime(y) with x and y already in the sequence. - Gus Wiseman, May 04 2021

Examples

			From _Gus Wiseman_, May 04 2021: (Start)
The sequence of trees (starting with 1) begins:
     1: o
     4: (oo)
    14: (o(oo))
    49: ((oo)(oo))
    86: (o(o(oo)))
   301: ((oo)(o(oo)))
   454: (o((oo)(oo)))
   886: (o(o(o(oo))))
  1589: ((oo)((oo)(oo)))
  1849: ((o(oo))(o(oo)))
  3101: ((oo)(o(o(oo))))
  3986: (o((oo)(o(oo))))
  6418: (o(o((oo)(oo))))
  9761: ((o(oo))((oo)(oo)))
(End)
		

Crossrefs

Cf. A245824 (by number of leaves).
These trees are counted by 2*A001190 - 1.
The semi-binary version is A292050 (counted by A001190).
The semi-identity case is A339193 (counted by A063895).
A000081 counts unlabeled rooted trees with n nodes.
A007097 ranks rooted chains.
A276625 ranks identity trees, counted by A004111.
A306202 ranks semi-identity trees, counted by A306200.
A306203 ranks balanced semi-identity trees, counted by A306201.
A331965 ranks lone-child avoiding semi-identity trees, counted by A331966.

Programs

  • Mathematica
    nn=20000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    binQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[Length[m]===2,And@@binQ/@m]]];
    Select[Range[2,nn],binQ] (* Gus Wiseman, Aug 28 2017 *)
  • PARI
    i(n)=n==2 || is(primepi(n))
    is(n)=if(n<14,return(n==4)); my(f=factor(n),t=#f[,1]); if(t>1, t==2 && f[1,2]==1 && f[2,2]==1 && i(f[1,1]) && i(f[2,1]), f[1,2]==2 && i(f[1,1])) \\ Charles R Greathouse IV, Mar 29 2013
    
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, if(i(p)&&i(q), listput(v, t*q)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Mar 29 2013
    
  • PARI
    \\ Also see links.

Formula

The Matula tree of k is defined as follows:
matula(k):
create a node labeled k
for each prime factor m of k:
add the subtree matula(prime(m)), by an edge labeled m
return the node

Extensions

Definition corrected by Charles R Greathouse IV, Mar 29 2013
a(27)-a(39) from Charles R Greathouse IV, Mar 29 2013

A063895 Start with x, xy; then concatenate each word in turn with all preceding words, getting x xy xxy xxxy xyxxy xxxxy xyxxxy xxyxxxy ...; sequence gives number of words of length n. Also binary trees by degree: x (x,y) (x,(x,y)) (x,(x,(x,y))) ((x,y),(x,(x,y)))...

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 11, 22, 43, 88, 179, 372, 774, 1631, 3448, 7347, 15713, 33791, 72923, 158021, 343495, 749102, 1638103, 3591724, 7893802, 17387931, 38379200, 84875596, 188036830, 417284181, 927469845, 2064465341, 4601670625, 10270463565, 22950838755
Offset: 1

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Aug 29 2001

Keywords

Comments

Also binary rooted identity trees (those with no symmetries, cf. A004111).
From Gus Wiseman, May 04 2021: (Start)
Also the number of unlabeled binary rooted semi-identity trees with 2*n - 1 nodes. In a semi-identity tree, only the non-leaf branches directly under any given vertex are required to be distinct. Alternatively, an unlabeled rooted tree is a semi-identity tree iff the non-leaf branches of the root are all distinct and are themselves semi-identity trees. For example, the a(3) = 1 through a(6) = 6 trees are:
(o(oo)) (o(o(oo))) ((oo)(o(oo))) ((oo)(o(o(oo)))) ((o(oo))(o(o(oo))))
(o(o(o(oo)))) (o((oo)(o(oo)))) ((oo)((oo)(o(oo))))
(o(o(o(o(oo))))) ((oo)(o(o(o(oo)))))
(o((oo)(o(o(oo)))))
(o(o((oo)(o(oo)))))
(o(o(o(o(o(oo))))))
The a(8) = 11 trees with 15 nodes:
((o(oo))((oo)(o(oo))))
((o(oo))(o(o(o(oo)))))
((oo)((oo)(o(o(oo)))))
((oo)(o((oo)(o(oo)))))
((oo)(o(o(o(o(oo))))))
(o((o(oo))(o(o(oo)))))
(o((oo)((oo)(o(oo)))))
(o((oo)(o(o(o(oo))))))
(o(o((oo)(o(o(oo))))))
(o(o(o((oo)(o(oo))))))
(o(o(o(o(o(o(oo)))))))
(End)

Crossrefs

The non-semi-identity version is 2*A001190(n)-1, ranked by A111299.
Semi-binary trees are also counted by A001190, but ranked by A292050.
The not necessarily binary version is A306200, ranked A306202.
The Matula-Goebel numbers of these trees are A339193.
The plane tree version is A343663.
A000081 counts unlabeled rooted trees with n nodes.
A004111 counts identity trees, ranked by A276625.
A306201 counts balanced semi-identity trees, ranked by A306203.
A331966 counts lone-child avoiding semi-identity trees, ranked by A331965.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, n*(3-n)/2, add(a(i)*a(n-i),
          i=1..(n-1)/2)+`if`(irem(n, 2, 'r')=0, (p->(p-1)*p/2)(a(r)), 0))
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Aug 02 2013
  • Mathematica
    a[n_] := a[n] = If[n<3, n*(3-n)/2, Sum[a[i]*a[n-i], {i, 1, (n-1)/2}]+If[{q, r} = QuotientRemainder[n, 2]; r == 0, (a[q]-1)*a[q]/2, 0]]; Table[a[n], {n, 1, 36}] (* Jean-François Alcover, Feb 25 2014, after Alois P. Heinz *)
    ursiq[n_]:=Join@@Table[Select[Union[Sort/@Tuples[ursiq/@ptn]],#=={}||#=={{},{}}||Length[#]==2&&(UnsameQ@@DeleteCases[#,{}])&],{ptn,IntegerPartitions[n-1]}];Table[Length[ursiq[n]],{n,1,15,2}] (* Gus Wiseman, May 04 2021 *)
  • PARI
    {a(n)=local(A, m); if(n<1, 0, m=1; A=O(x); while( m<=n, m*=2; A=1-sqrt(1-2*x-2*x^2+subst(A, x, x^2))); polcoeff(A, n))}

Formula

a(n) = (sum a(i)*a(j), i+j=n, i2. a(1)=a(2)=1.
G.f. A(x) = 1-sqrt(1-2x-2x^2+A(x^2)) satisfies x+x^2-A(x)+(A(x)^2-A(x^2))/2=0, A(0)=0. - Michael Somos, Sep 06 2003
a(n) ~ c * d^n / n^(3/2), where d = 2.33141659246516873904600076533362924695..., c = 0.2873051160895040470174351963... . - Vaclav Kotesovec, Sep 11 2014

Extensions

Additional comments and g.f. from Christian G. Bower, Nov 29 2001

A331683 One and all numbers of the form 2^k * prime(j) for k > 0 and j already in the sequence.

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 56, 64, 76, 86, 106, 112, 128, 152, 172, 212, 214, 224, 256, 262, 304, 326, 344, 424, 428, 448, 512, 524, 526, 608, 622, 652, 688, 766, 848, 856, 886, 896, 1024, 1048, 1052, 1154, 1216, 1226, 1244, 1304, 1376, 1438, 1532, 1696
Offset: 1

Views

Author

Gus Wiseman, Jan 30 2020

Keywords

Comments

Also Matula-Goebel numbers of lone-child-avoiding rooted trees at with at most one non-leaf branch under any given vertex. A rooted tree is lone-child-avoiding if there are no unary branchings. The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of the root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Also Matula-Goebel numbers of lone-child-avoiding locally disjoint semi-identity trees. Locally disjoint means no branch of any vertex overlaps a different (unequal) branch of the same vertex. In a semi-identity tree, all non-leaf branches of any given vertex are distinct.

Examples

			The sequence of all lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex 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))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  152: (ooo(ooo))
  172: (oo(o(oo)))
  212: (oo(oooo))
  214: (o(oo(oo)))
  224: (ooooo(oo))
		

Crossrefs

These trees counted by number of vertices are A212804.
The semi-lone-child-avoiding version is A331681.
The non-semi-identity version is A331871.
Lone-child-avoiding rooted trees are counted by A001678.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.
Unlabeled semi-identity trees are counted by A306200, with Matula-Goebel numbers A306202.
Locally disjoint rooted trees are counted by A316473.
Matula-Goebel numbers of locally disjoint rooted trees are A316495.
Lone-child-avoiding locally disjoint rooted trees by leaves are A316697.

Programs

  • Maple
    N:= 10^4: # for terms <= N
    S:= {1}:
    with(queue):
    Q:= new(1):
    while not empty(Q) do
      r:= dequeue(Q);
      p:= ithprime(r);
      newS:= {seq(2^i*p,i=1..ilog2(N/p))} minus S;
      S:= S union newS;
      for s in newS do enqueue(Q,s) od:
    od:
    sort(convert(S,list)); # Robert Israel, Feb 05 2020
  • Mathematica
    uryQ[n_]:=n==1||MatchQ[FactorInteger[n],({{2,},{p,1}}/;uryQ[PrimePi[p]])|({{2,k_}}/;k>1)];
    Select[Range[100],uryQ]

Formula

Intersection of A291636, A316495, and A306202.

A331965 Matula-Goebel numbers of lone-child-avoiding rooted semi-identity trees.

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 56, 64, 76, 86, 106, 112, 128, 133, 152, 172, 212, 214, 224, 256, 262, 266, 301, 304, 326, 344, 371, 424, 428, 448, 512, 524, 526, 532, 602, 608, 622, 652, 688, 742, 749, 766, 817, 848, 856, 886, 896, 917, 1007, 1024, 1048, 1052
Offset: 1

Views

Author

Gus Wiseman, Feb 04 2020

Keywords

Comments

First differs from A331683 in having 133, the Matula-Goebel number of the tree ((oo)(ooo)).
Lone-child-avoiding means there are no unary branchings.
In a semi-identity tree, the non-leaf branches of any given vertex are all distinct.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Consists of one, and all composite numbers that are n times a power of two, where n is a squarefree number whose prime indices already belong to the sequence, and a prime index of n is a number m such that prime(m) divides n. [Clarified by Peter Munn and Gus Wiseman, Jun 24 2021]

Examples

			The sequence of all lone-child-avoiding rooted semi-identity 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))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  133: ((oo)(ooo))
  152: (ooo(ooo))
  172: (oo(o(oo)))
  212: (oo(oooo))
  214: (o(oo(oo)))
The sequence of terms together with their prime indices begins:
    1: {}                 224: {1,1,1,1,1,4}
    4: {1,1}              256: {1,1,1,1,1,1,1,1}
    8: {1,1,1}            262: {1,32}
   14: {1,4}              266: {1,4,8}
   16: {1,1,1,1}          301: {4,14}
   28: {1,1,4}            304: {1,1,1,1,8}
   32: {1,1,1,1,1}        326: {1,38}
   38: {1,8}              344: {1,1,1,14}
   56: {1,1,1,4}          371: {4,16}
   64: {1,1,1,1,1,1}      424: {1,1,1,16}
   76: {1,1,8}            428: {1,1,28}
   86: {1,14}             448: {1,1,1,1,1,1,4}
  106: {1,16}             512: {1,1,1,1,1,1,1,1,1}
  112: {1,1,1,1,4}        524: {1,1,32}
  128: {1,1,1,1,1,1,1}    526: {1,56}
  133: {4,8}              532: {1,1,4,8}
  152: {1,1,1,8}          602: {1,4,14}
  172: {1,1,14}           608: {1,1,1,1,1,8}
  212: {1,1,16}           622: {1,64}
  214: {1,28}             652: {1,1,38}
		

Crossrefs

The non-semi case is {1}.
Not requiring lone-child-avoidance gives A306202.
The locally disjoint version is A331683.
These trees are counted by A331966.
The semi-lone-child-avoiding case is A331994.
Matula-Goebel numbers of rooted identity trees are A276625.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.
Semi-identity trees are counted by A306200.

Programs

  • Mathematica
    csiQ[n_]:=n==1||!PrimeQ[n]&&FreeQ[FactorInteger[n],{?(#>2&),?(#>1&)}]&&And@@csiQ/@PrimePi/@First/@FactorInteger[n];
    Select[Range[100],csiQ]

Formula

Intersection of A291636 and A306202.

A331966 Number of lone-child-avoiding rooted semi-identity trees with n vertices.

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 5, 9, 16, 30, 55, 105, 200, 388, 754, 1483, 2923, 5807, 11575, 23190, 46608, 94043, 190287, 386214, 785831, 1602952, 3276845, 6712905, 13778079, 28330583, 58350582, 120370731, 248676129, 514459237, 1065696295, 2210302177, 4589599429, 9540623926
Offset: 1

Views

Author

Gus Wiseman, Feb 05 2020

Keywords

Comments

Lone-child-avoiding means there are no unary branchings.
In a semi-identity tree, the non-leaf branches of any given vertex are distinct.

Examples

			The a(1) = 1 through a(9) = 16 trees (empty column shown as dot):
  o  .  (oo)  (ooo)  (oooo)   (ooooo)   (oooooo)    (ooooooo)    (oooooooo)
                     (o(oo))  (o(ooo))  (o(oooo))   (o(ooooo))   (o(oooooo))
                              (oo(oo))  (oo(ooo))   (oo(oooo))   (oo(ooooo))
                                        (ooo(oo))   (ooo(ooo))   (ooo(oooo))
                                        (o(o(oo)))  (oooo(oo))   (oooo(ooo))
                                                    ((oo)(ooo))  (ooooo(oo))
                                                    (o(o(ooo)))  ((oo)(oooo))
                                                    (o(oo(oo)))  (o(o(oooo)))
                                                    (oo(o(oo)))  (o(oo)(ooo))
                                                                 (o(oo(ooo)))
                                                                 (o(ooo(oo)))
                                                                 (oo(o(ooo)))
                                                                 (oo(oo(oo)))
                                                                 (ooo(o(oo)))
                                                                 ((oo)(o(oo)))
                                                                 (o(o(o(oo))))
		

Crossrefs

The non-semi case is A000007.
Lone-child-avoiding rooted trees are A001678.
The locally disjoint case is A212804.
Not requiring lone-child-avoidance gives A306200.
Matula-Goebel numbers of these trees are A331965.
The semi-lone-child-avoiding version is A331993.

Programs

  • Mathematica
    ssb[n_]:=If[n==1,{{}},Join@@Function[c,Select[Union[Sort/@Tuples[ssb/@c]],UnsameQ@@DeleteCases[#,{}]&]]/@Rest[IntegerPartitions[n-1]]];
    Table[Length[ssb[n]],{n,10}]
  • PARI
    WeighT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v,n,(-1)^(n-1)/n))))-1,-#v)}
    seq(n)={my(v=[0, 0]); for(n=2, n-1, v=concat(v, 1 + vecsum(WeighT(v)) - v[n])); v[1]=1; v} \\ Andrew Howroyd, Feb 09 2020

Extensions

Terms a(31) and beyond from Andrew Howroyd, Feb 09 2020

A331936 Matula-Goebel numbers of semi-lone-child-avoiding rooted trees with at most one distinct non-leaf branch directly under any vertex (semi-achirality).

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 12, 14, 16, 18, 24, 26, 27, 28, 32, 36, 38, 46, 48, 49, 52, 54, 56, 64, 72, 74, 76, 81, 86, 92, 96, 98, 104, 106, 108, 112, 122, 128, 144, 148, 152, 162, 169, 172, 178, 184, 192, 196, 202, 206, 208, 212, 214, 216, 224, 243, 244, 256, 262, 288
Offset: 1

Views

Author

Gus Wiseman, Feb 03 2020

Keywords

Comments

First differs from A331873 in lacking 69, the Matula-Goebel number of the tree ((o)((o)(o))).
A rooted tree is semi-lone-child-avoiding if there are no vertices with exactly one child unless that child is an endpoint/leaf.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Consists of 1, 2, and all numbers equal to a power of 2 (other than 1) times a power of prime(j) for some j > 1 already in the sequence.

Examples

			The sequence of rooted trees ranked by this sequence together with their Matula-Goebel numbers begins:
   1: o
   2: (o)
   4: (oo)
   6: (o(o))
   8: (ooo)
   9: ((o)(o))
  12: (oo(o))
  14: (o(oo))
  16: (oooo)
  18: (o(o)(o))
  24: (ooo(o))
  26: (o(o(o)))
  27: ((o)(o)(o))
  28: (oo(oo))
  32: (ooooo)
  36: (oo(o)(o))
  38: (o(ooo))
  46: (o((o)(o)))
  48: (oooo(o))
  49: ((oo)(oo))
The sequence of terms together with their prime indices begins:
    1: {}              52: {1,1,6}            152: {1,1,1,8}
    2: {1}             54: {1,2,2,2}          162: {1,2,2,2,2}
    4: {1,1}           56: {1,1,1,4}          169: {6,6}
    6: {1,2}           64: {1,1,1,1,1,1}      172: {1,1,14}
    8: {1,1,1}         72: {1,1,1,2,2}        178: {1,24}
    9: {2,2}           74: {1,12}             184: {1,1,1,9}
   12: {1,1,2}         76: {1,1,8}            192: {1,1,1,1,1,1,2}
   14: {1,4}           81: {2,2,2,2}          196: {1,1,4,4}
   16: {1,1,1,1}       86: {1,14}             202: {1,26}
   18: {1,2,2}         92: {1,1,9}            206: {1,27}
   24: {1,1,1,2}       96: {1,1,1,1,1,2}      208: {1,1,1,1,6}
   26: {1,6}           98: {1,4,4}            212: {1,1,16}
   27: {2,2,2}        104: {1,1,1,6}          214: {1,28}
   28: {1,1,4}        106: {1,16}             216: {1,1,1,2,2,2}
   32: {1,1,1,1,1}    108: {1,1,2,2,2}        224: {1,1,1,1,1,4}
   36: {1,1,2,2}      112: {1,1,1,1,4}        243: {2,2,2,2,2}
   38: {1,8}          122: {1,18}             244: {1,1,18}
   46: {1,9}          128: {1,1,1,1,1,1,1}    256: {1,1,1,1,1,1,1,1}
   48: {1,1,1,1,2}    144: {1,1,1,1,2,2}      262: {1,32}
   49: {4,4}          148: {1,1,12}           288: {1,1,1,1,1,2,2}
		

Crossrefs

A superset of A000079.
The non-lone-child-avoiding version is A320230.
The non-semi version is A320269.
These trees are counted by A331933.
Not requiring semi-achirality gives A331935.
The fully-achiral case is A331992.
Achiral trees are counted by A003238.
Numbers with at most one distinct odd prime factor are A070776.
Matula-Goebel numbers of achiral rooted trees are A214577.
Matula-Goebel numbers of semi-identity trees are A306202.
Numbers S with at most one distinct prime index in S are A331912.

Programs

  • Mathematica
    msQ[n_]:=n<=2||!PrimeQ[n]&&Length[DeleteCases[FactorInteger[n],{2,_}]]<=1&&And@@msQ/@PrimePi/@First/@FactorInteger[n];
    Select[Range[100],msQ]

Formula

Intersection of A320230 and A331935.

A331681 One, two, and all numbers of the form 2^k * prime(j) where k > 0 and j already belongs to the sequence.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 14, 16, 24, 26, 28, 32, 38, 48, 52, 56, 64, 74, 76, 86, 96, 104, 106, 112, 128, 148, 152, 172, 178, 192, 202, 208, 212, 214, 224, 256, 262, 296, 304, 326, 344, 356, 384, 404, 416, 424, 428, 446, 448, 478, 512, 524, 526, 592, 608, 622, 652
Offset: 1

Views

Author

Gus Wiseman, Jan 26 2020

Keywords

Comments

Also Matula-Goebel numbers of semi-lone-child-avoiding locally disjoint rooted semi-identity trees. A rooted tree is semi-lone-child-avoiding if there are no vertices with exactly one child unless the child is an endpoint/leaf. Locally disjoint means no branch of any vertex overlaps a different (unequal) branch of the same vertex. In a semi-identity tree, all non-leaf branches of any given vertex are distinct. Note that these conditions together imply that there is at most one non-leaf branch under any given vertex.
Also Matula-Goebel numbers of semi-lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches (of the root), which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of all semi-lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex, together with their Matula-Goebel numbers, begins:
   1: o
   2: (o)
   4: (oo)
   6: (o(o))
   8: (ooo)
  12: (oo(o))
  14: (o(oo))
  16: (oooo)
  24: (ooo(o))
  26: (o(o(o)))
  28: (oo(oo))
  32: (ooooo)
  38: (o(ooo))
  48: (oooo(o))
  52: (oo(o(o)))
  56: (ooo(oo))
  64: (oooooo)
  74: (o(oo(o)))
  76: (oo(ooo))
  86: (o(o(oo)))
		

Crossrefs

The enumeration of these trees by nodes is A324969 (essentially A000045).
The enumeration of these trees by leaves appears to be A090129(n + 1).
The (non-semi) lone-child-avoiding version is A331683.
Matula-Goebel numbers of rooted semi-identity trees are A306202.
Lone-child-avoiding locally disjoint rooted trees by leaves are A316697.
The set S of numbers with at most one prime index in S is A331784.
Matula-Goebel numbers of locally disjoint rooted trees are A316495.

Programs

  • Maple
    N:= 1000: # for terms <= N
    S:= {1,2}:
    with(queue):
    Q:= new(1,2):
    while not empty(Q) do
      r:= dequeue(Q);
      p:= ithprime(r);
      newS:= {seq(2^i*p,i=1..ilog2(N/p))} minus S;
      S:= S union newS;
      for s in newS do enqueue(Q,s) od:
    od:
    sort(convert(S,list)); # Robert Israel, Feb 05 2020
  • Mathematica
    uryQ[n_]:=n==1||MatchQ[FactorInteger[n],({{2,},{p,1}}/;uryQ[PrimePi[p]])|{{2,_}}];
    Select[Range[100],uryQ]

Formula

Intersection of A306202 (semi-identity), A316495 (locally disjoint), and A331935 (semi-lone-child-avoiding). - Gus Wiseman, Jun 09 2020

A331963 Matula-Goebel numbers of semi-lone-child-avoiding rooted identity trees.

Original entry on oeis.org

1, 2, 6, 26, 39, 78, 202, 303, 334, 501, 606, 794, 1002, 1191, 1313, 2171, 2382, 2462, 2626, 3693, 3939, 3998, 4342, 4486, 5161, 5997, 6513, 6729, 7162, 7386, 7878, 8914, 10322, 10743, 11994, 12178, 13026, 13371, 13458, 15483, 15866, 16003, 16867, 18267, 19286
Offset: 1

Views

Author

Gus Wiseman, Feb 03 2020

Keywords

Comments

A rooted tree is semi-lone-child-avoiding if there are no vertices with exactly one child unless the child is an endpoint/leaf. It is an identity tree if the branches under any given vertex are all distinct.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Consists of one, two, and all nonprime squarefree numbers whose prime indices already belong to the sequence, where a prime index of n is a number m such that prime(m) divides n.

Examples

			The sequence of all semi-lone-child-avoiding rooted identity trees together with their Matula-Goebel numbers begins:
    1: o
    2: (o)
    6: (o(o))
   26: (o(o(o)))
   39: ((o)(o(o)))
   78: (o(o)(o(o)))
  202: (o(o(o(o))))
  303: ((o)(o(o(o))))
  334: (o((o)(o(o))))
  501: ((o)((o)(o(o))))
  606: (o(o)(o(o(o))))
  794: (o(o(o)(o(o))))
		

Crossrefs

A subset of A276625 (MG-numbers of identity trees).
Not requiring an identity tree gives A331935.
The locally disjoint version is A331937.
These trees are counted by A331964.
The semi-identity case is A331994.
Matula-Goebel numbers of identity trees are A276625.
Matula-Goebel numbers of lone-child-avoiding rooted semi-identity trees are A331965.

Programs

  • Mathematica
    msiQ[n_]:=n==1||n==2||!PrimeQ[n]&&SquareFreeQ[n]&&And@@msiQ/@PrimePi/@First/@FactorInteger[n];
    Select[Range[1000],msiQ]

Formula

Intersection of A276625 (identity trees) and A331935 (semi-lone-child-avoiding).

A320269 Matula-Goebel numbers of lone-child-avoiding rooted trees in which the non-leaf branches directly under any given node are all equal (semi-achirality).

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 49, 56, 64, 76, 86, 98, 106, 112, 128, 152, 172, 196, 212, 214, 224, 256, 262, 304, 326, 343, 344, 361, 392, 424, 428, 448, 454, 512, 524, 526, 608, 622, 652, 686, 688, 722, 766, 784, 848, 856, 886, 896, 908, 1024, 1042, 1048, 1052
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2018

Keywords

Comments

First differs from A331871 in lacking 1589.
Lone-child-avoiding means there are no unary branchings.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of 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)
  152: (ooo(ooo))
  172: (oo(o(oo)))
  196: (oo(oo)(oo))
		

Crossrefs

The same-tree version is A291441.
Not requiring lone-child-avoidance gives A320230.
The enumeration of these trees by vertices is A320268.
The semi-lone-child-avoiding version is A331936.
If the non-leaf branches are all different instead of equal we get A331965.
The fully-achiral case is A331967.
Achiral rooted trees are counted by A003238.
MG-numbers of lone-child-avoiding rooted trees are A291636.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]
    hmakQ[n_]:=And[!PrimeQ[n],SameQ@@DeleteCases[primeMS[n],1],And@@hmakQ/@primeMS[n]];Select[Range[1000],hmakQ[#]&]

Extensions

Updated with corrected terminology by Gus Wiseman, Feb 06 2020

A331783 Number of locally disjoint rooted semi-identity trees with n unlabeled vertices.

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 37, 83, 191, 450, 1076, 2610, 6404, 15875, 39676, 99880, 253016, 644524, 1649918, 4242226
Offset: 1

Views

Author

Gus Wiseman, Jan 31 2020

Keywords

Comments

Locally disjoint means no branch of any vertex overlaps a different (unequal) branch of the same vertex. In a semi-identity tree, all non-leaf branches of any given vertex are distinct.

Examples

			The a(1) = 1 through a(6) = 17 trees:
  o  (o)  (oo)   (ooo)    (oooo)     (ooooo)
          ((o))  ((oo))   ((ooo))    ((oooo))
                 (o(o))   (o(oo))    (o(ooo))
                 (((o)))  (oo(o))    (oo(oo))
                          (((oo)))   (ooo(o))
                          ((o(o)))   (((ooo)))
                          (o((o)))   ((o(oo)))
                          ((((o))))  ((oo(o)))
                                     (o((oo)))
                                     (o(o(o)))
                                     (oo((o)))
                                     ((((oo))))
                                     (((o(o))))
                                     ((o)((o)))
                                     ((o((o))))
                                     (o(((o))))
                                     (((((o)))))
		

Crossrefs

The lone-child-avoiding case is A212804.
The identity tree version is A316471.
The Matula-Goebel numbers of these trees are given by A331682.
Identity trees are A004111.
Semi-identity trees are A306200.
Locally disjoint rooted trees are A316473.
Matula-Goebel numbers of locally disjoint semi-identity trees are A316494.

Programs

  • Mathematica
    disjunsQ[u_]:=Length[u]==1||UnsameQ@@DeleteCases[u,{}]&&Apply[And,Outer[#1==#2||Intersection[#1,#2]=={}&,u,u,1],{0,1}];
    ldrsi[n_]:=If[n==1,{{}},Select[Join@@Function[c,Union[Sort/@Tuples[ldrsi/@c]]]/@IntegerPartitions[n-1],disjunsQ]];
    Table[Length[ldrsi[n]],{n,10}]
Showing 1-10 of 17 results. Next