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

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

A050381 Number of series-reduced planted trees with n leaves of 2 colors.

Original entry on oeis.org

2, 3, 10, 40, 170, 785, 3770, 18805, 96180, 502381, 2667034, 14351775, 78096654, 429025553, 2376075922, 13252492311, 74372374366, 419651663108, 2379399524742, 13549601275893, 77460249369658, 444389519874841
Offset: 1

Views

Author

Christian G. Bower, Nov 15 1999

Keywords

Comments

Consider the free algebraic system with two commutative associative operators (x+y) and (x*y) and two generators A,B. The number of elements with n occurrences of the generators is 2*a(n) if n>1, and the number of generators if n=1. - Michael Somos, Aug 07 2017
From Gus Wiseman, Feb 07 2020: (Start)
Also the number of semi-lone-child-avoiding rooted trees with n leaves. Semi-lone-child-avoiding means there are no vertices with exactly one child unless that child is an endpoint/leaf. For example, the a(1) = 2 through a(3) = 10 trees are:
o (oo) (ooo)
(o) (o(o)) (o(oo))
((o)(o)) (oo(o))
((o)(oo))
(o(o)(o))
(o(o(o)))
((o)(o)(o))
((o)(o(o)))
(o((o)(o)))
((o)((o)(o)))
(End)

Examples

			For n=2, the 2*a(2) = 6 elements are: A+A, A+B, B+B, A*A, A*B, B*B. - _Michael Somos_, Aug 07 2017
		

Crossrefs

Column 2 of A319254.
Lone-child-avoiding rooted trees with n leaves are A000669.
Lone-child-avoiding rooted trees with n vertices are A001678.
The locally disjoint case is A331874.
Semi-lone-child-avoiding rooted trees with n vertices are A331934.
Matula-Goebel numbers of these trees are A331935.

Programs

  • Mathematica
    terms = 22;
    B[x_] = x O[x]^(terms+1);
    A[x_] = 1/(1 - x + B[x])^2;
    Do[A[x_] = A[x]/(1 - x^k + B[x])^Coefficient[A[x], x, k] + O[x]^(terms+1) // Normal, {k, 2, terms+1}];
    Join[{2}, Drop[CoefficientList[A[x], x]/2, 2]] (* Jean-François Alcover, Aug 17 2018, after Michael Somos *)
    slaurte[n_]:=If[n==1,{o,{o}},Join@@Table[Union[Sort/@Tuples[slaurte/@ptn]],{ptn,Rest[IntegerPartitions[n]]}]];
    Table[Length[slaurte[n]],{n,10}] (* Gus Wiseman, Feb 07 2020 *)
  • PARI
    {a(n) = my(A, B); if( n<2, 2*(n>0), B = x * O(x^n); A = 1 / (1 - x + B)^2; for(k=2, n, A /= (1 - x^k + B)^polcoeff(A, k)); polcoeff(A, n)/2)}; /* Michael Somos, Aug 07 2017 */

Formula

Doubles (index 2+) under EULER transform.
Product_{k>=1} (1-x^k)^-a(k) = 1 + a(1)*x + Sum_{k>=2} 2*a(k)*x^k. - Michael Somos, Aug 07 2017
a(n) ~ c * d^n / n^(3/2), where d = 6.158893517087396289837838459951206775682824030495453326610366016992093939... and c = 0.1914250508201011360729769525164141605187995730026600722369002... - Vaclav Kotesovec, Aug 17 2018

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

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).

A331937 a(1) = 1; a(2) = 2; a(n + 1) = 2 * prime(a(n)).

Original entry on oeis.org

1, 2, 6, 26, 202, 2462, 43954, 1063462, 33076174, 1270908802, 58596709306, 3170266564862, 197764800466826, 14024066291995502, 1117378164606478094
Offset: 1

Views

Author

Gus Wiseman, Feb 07 2020

Keywords

Comments

Also Matula-Goebel numbers of semi-lone-child-avoiding locally disjoint rooted identity trees. A rooted tree is locally disjoint if no child of any vertex has branches overlapping the branches of any other (inequivalent) child of the same vertex. It is semi-lone-child-avoiding if there are no vertices with exactly one child unless that child is an endpoint/leaf. In an identity tree, the 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.

Examples

			The sequence of terms together with their associated trees begins:
     1: o
     2: (o)
     6: (o(o))
    26: (o(o(o)))
   202: (o(o(o(o))))
  2462: (o(o(o(o(o)))))
		

Crossrefs

The semi-identity tree version is A331681.
Not requiring an identity tree gives A331873.
Not requiring local disjointness gives A331963.
Not requiring lone-child-avoidance gives A316494.
MG-numbers of semi-lone-child-avoiding rooted trees are A331935.

Programs

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

Formula

Intersection of A276625 (identity), A316495 (locally disjoint), and A331935 (semi-lone-child-avoiding).

Extensions

a(14)-a(15) from Giovanni Resta, Feb 10 2020

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

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 14, 16, 21, 24, 26, 28, 32, 38, 39, 42, 48, 52, 56, 57, 64, 74, 76, 78, 84, 86, 91, 96, 104, 106, 111, 112, 114, 128, 129, 133, 146, 148, 152, 156, 159, 168, 172, 178, 182, 192, 202, 208, 212, 214, 219, 222, 224, 228, 247, 256, 258, 259, 262
Offset: 1

Views

Author

Gus Wiseman, Feb 05 2020

Keywords

Comments

Semi-lone-child-avoiding means there are no vertices with exactly one child unless that child is an endpoint/leaf.
In a semi-identity tree, the non-leaf branches of any given vertex are 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 numbers that can be written as a power of two (other than 2) times a squarefree number 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 semi-identity trees 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)
  21: ((o)(oo))
  24: (ooo(o))
  26: (o(o(o)))
  28: (oo(oo))
  32: (ooooo)
  38: (o(ooo))
  39: ((o)(o(o)))
  42: (o(o)(oo))
  48: (oooo(o))
  52: (oo(o(o)))
  56: (ooo(oo))
  57: ((o)(ooo))
The sequence of terms together with their prime indices begins:
    1: {}              64: {1,1,1,1,1,1}      159: {2,16}
    2: {1}             74: {1,12}             168: {1,1,1,2,4}
    4: {1,1}           76: {1,1,8}            172: {1,1,14}
    6: {1,2}           78: {1,2,6}            178: {1,24}
    8: {1,1,1}         84: {1,1,2,4}          182: {1,4,6}
   12: {1,1,2}         86: {1,14}             192: {1,1,1,1,1,1,2}
   14: {1,4}           91: {4,6}              202: {1,26}
   16: {1,1,1,1}       96: {1,1,1,1,1,2}      208: {1,1,1,1,6}
   21: {2,4}          104: {1,1,1,6}          212: {1,1,16}
   24: {1,1,1,2}      106: {1,16}             214: {1,28}
   26: {1,6}          111: {2,12}             219: {2,21}
   28: {1,1,4}        112: {1,1,1,1,4}        222: {1,2,12}
   32: {1,1,1,1,1}    114: {1,2,8}            224: {1,1,1,1,1,4}
   38: {1,8}          128: {1,1,1,1,1,1,1}    228: {1,1,2,8}
   39: {2,6}          129: {2,14}             247: {6,8}
   42: {1,2,4}        133: {4,8}              256: {1,1,1,1,1,1,1,1}
   48: {1,1,1,1,2}    146: {1,21}             258: {1,2,14}
   52: {1,1,6}        148: {1,1,12}           259: {4,12}
   56: {1,1,1,4}      152: {1,1,1,8}          262: {1,32}
   57: {2,8}          156: {1,1,2,6}          266: {1,4,8}
		

Crossrefs

The locally disjoint version is A331681.
The enumeration of these trees by vertices is A331993.
Semi-identity trees are A306200.
MG-numbers of rooted identity trees are A276625.
MG-numbers of lone-child-avoiding rooted identity trees are {1}.
MG-numbers of lone-child-avoiding rooted trees are A291636.
MG-numbers of semi-identity trees are A306202.
MG-numbers of semi-lone-child-avoiding rooted trees are A331935.
MG-numbers of semi-lone-child-avoiding rooted identity trees are A331963.
MG-numbers of lone-child-avoiding rooted semi-identity trees are A331965.

Programs

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

Formula

Intersection of A306202 and A331935.

A331991 Number of semi-lone-child-avoiding achiral rooted trees with n vertices.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 3, 2, 4, 1, 5, 1, 5, 4, 4, 1, 7, 1, 7, 5, 6, 1, 7, 3, 7, 5, 7, 1, 13, 1, 8, 6, 6, 6, 10, 1, 9, 7, 9, 1, 15, 1, 12, 12, 8, 1, 12, 4, 13, 6, 11, 1, 15, 7, 13, 9, 9, 1, 17, 1, 15, 15, 9, 8, 21, 1, 13, 8, 16, 1, 18, 1, 12, 16, 11, 8, 21, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 06 2020

Keywords

Comments

A rooted tree is semi-lone-child-avoiding if there are no vertices with exactly one child unless that child is an endpoint/leaf.
In an achiral rooted tree, the branches of any given vertex are all equal.

Examples

			The a(n) trees for n = 2, 3, 5, 7, 11, 13:
  (o)  (oo)  (oooo)    (oooooo)     (oooooooooo)        (oooooooooooo)
             ((o)(o))  ((oo)(oo))   ((oooo)(oooo))      ((ooooo)(ooooo))
                       ((o)(o)(o))  ((o)(o)(o)(o)(o))   ((ooo)(ooo)(ooo))
                                    (((o)(o))((o)(o)))  ((oo)(oo)(oo)(oo))
                                                        ((o)(o)(o)(o)(o)(o))
		

Crossrefs

Matula-Goebel numbers of these trees are A331992.
The fully lone-child-avoiding case is A167865.
The semi-achiral version is A331933.
Not requiring achirality gives A331934.
The identity tree version is A331964.
The semi-identity tree version is A331993.
Achiral rooted trees are counted by A003238.
Lone-child-avoiding semi-achiral trees are A320268.

Programs

  • Mathematica
    ab[n_]:=If[n<=2,1,Sum[ab[d],{d,Most[Divisors[n-1]]}]];
    Array[ab,100]

Formula

a(1) = a(2) = 1; a(n + 1) = Sum_{d|n, d 1.
G.f. A(x) satisfies: A(x) = x * (1 + (1/(1 + x)) * Sum_{k>=1} A(x^k)). - Ilya Gutkovskiy, Feb 25 2020

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

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 11, 22, 43, 90, 185, 393, 835, 1802, 3904, 8540, 18756, 41463, 92022, 205179, 459086, 1030917, 2321949, 5245104, 11878750, 26967957, 61359917, 139902251, 319591669, 731385621, 1676573854, 3849288924, 8850674950, 20378544752, 46982414535
Offset: 1

Views

Author

Gus Wiseman, Feb 05 2020

Keywords

Comments

Semi-lone-child-avoiding means there are no vertices with exactly one child unless that child is an endpoint/leaf.
In a semi-identity tree, the non-leaf branches of any given vertex are distinct.

Examples

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

Crossrefs

Not requiring any lone-child-avoidance gives A306200.
The locally disjoint case is A324969 (essentially A000045).
Matula-Goebel numbers of these trees are A331994.
Lone-child-avoiding rooted identity trees are A000007.
Semi-lone-child-avoiding rooted trees are A331934.
Semi-lone-child-avoiding rooted identity trees are A331964.
Lone-child-avoiding rooted semi-identity trees are A331966.

Programs

  • Mathematica
    sssb[n_]:=Switch[n,1,{{}},2,{{{}}},_,Join@@Function[c,Select[Union[Sort/@Tuples[sssb/@c]],UnsameQ@@DeleteCases[#,{}]&]]/@Rest[IntegerPartitions[n-1]]];
    Table[Length[sssb[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]); for(n=1, n-1, v=concat(v, 1 + vecsum(WeighT(v)) - v[n])); v[1]=1; v} \\ Andrew Howroyd, Feb 09 2020

Extensions

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

A339193 Matula-Goebel numbers of unlabeled binary rooted semi-identity trees.

Original entry on oeis.org

1, 4, 14, 86, 301, 886, 3101, 3986, 13766, 13951, 19049, 48181, 57026, 75266, 85699, 199591, 263431, 295969, 298154, 302426, 426058, 882899
Offset: 1

Views

Author

Gus Wiseman, Mar 14 2021

Keywords

Comments

Definition: A positive integer belongs to the sequence iff it is 1, 4, or a squarefree semiprime whose prime indices both already belong to the sequence. A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
In a semi-identity tree, only the non-leaf branches of any given vertex are distinct. Alternatively, a rooted tree is a semi-identity tree if the non-leaf branches of the root are all distinct and are themselves semi-identity trees.
The Matula-Goebel number of an unlabeled 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 terms together with the corresponding unlabeled rooted trees begins:
      1: o
      4: (oo)
     14: (o(oo))
     86: (o(o(oo)))
    301: ((oo)(o(oo)))
    886: (o(o(o(oo))))
   3101: ((oo)(o(o(oo))))
   3986: (o((oo)(o(oo))))
  13766: (o(o(o(o(oo)))))
  13951: ((oo)((oo)(o(oo))))
  19049: ((o(oo))(o(o(oo))))
  48181: ((oo)(o(o(o(oo)))))
  57026: (o((oo)(o(o(oo)))))
  75266: (o(o((oo)(o(oo)))))
  85699: ((o(oo))((oo)(o(oo))))
		

Crossrefs

Counting these trees by number of nodes gives A063895.
A000081 counts unlabeled rooted trees with n nodes.
A111299 ranks binary trees, counted by A001190.
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
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    mgbiQ[n_]:=Or[n==1,n==4,SquareFreeQ[n]&&PrimeOmega[n]==2&&And@@mgbiQ/@primeMS[n]];
    Select[Range[1000],mgbiQ]

A343663 Number of unlabeled binary rooted semi-identity plane trees with 2*n - 1 nodes.

Original entry on oeis.org

1, 1, 2, 4, 12, 34, 108, 344, 1136, 3796, 12920, 44442, 154596, 542336, 1917648, 6825464, 24439008, 87962312, 318087216, 1155090092, 4210494616, 15400782912, 56508464736, 207935588586, 767162495940, 2837260332472, 10516827106016, 39063666532784, 145378611426512
Offset: 1

Views

Author

Gus Wiseman, May 05 2021

Keywords

Comments

In a semi-identity tree, only the non-leaf branches of any given vertex are required to be distinct. Alternatively, a rooted tree is a semi-identity tree if the non-leaf branches of the root are all distinct and are themselves semi-identity trees.

Examples

			The a(1) = 1 through a(5) = 12 trees:
  o  (oo)  ((oo)o)  (((oo)o)o)  ((((oo)o)o)o)
           (o(oo))  ((o(oo))o)  (((o(oo))o)o)
                    (o((oo)o))  (((oo)o)(oo))
                    (o(o(oo)))  ((o((oo)o))o)
                                ((o(o(oo)))o)
                                ((o(oo))(oo))
                                ((oo)((oo)o))
                                ((oo)(o(oo)))
                                (o(((oo)o)o))
                                (o((o(oo))o))
                                (o(o((oo)o)))
                                (o(o(o(oo))))
		

Crossrefs

The not necessarily semi-identity version is A000108.
The non-plane version is A063895, ranked by A339193.
The Matula-Goebel numbers in the non-plane case are A339193.
The not-necessarily binary version is A343937.
A000081 counts unlabeled rooted trees with n nodes.
2*A001190 - 1 counts binary trees, ranked by A111299.
A001190 counts semi-binary trees, ranked by A292050.
A004111 counts identity trees, ranked by A276625.
A306200 counts semi-identity trees, ranked by A306202.
A306201 counts balanced semi-identity trees, ranked by A306203.
A331966 counts lone-child avoiding semi-identity trees, ranked by A331965.

Programs

  • Mathematica
    crsiq[n_]:=Join@@Table[Select[Union[Tuples[crsiq/@ptn]],#=={}||#=={{},{}}||Length[#]==2&&(UnsameQ@@DeleteCases[#,{}])&],{ptn,Join@@Permutations/@IntegerPartitions[n-1]}];
    Table[Length[crsiq[n]],{n,1,11,2}]
    (* Second program: *)
    m = 29; p[_] = 1;
    Do[p[x_] = 1 + x + x (p[x]^2 - p[x^2]) + O[x]^m // Normal, {m}];
    CoefficientList[p[x], x] (* Jean-François Alcover, May 09 2021, after Andrew Howroyd *)
  • PARI
    seq(n)={my(p=O(1)); for(n=1, n, p=1 + x + x*(p^2-subst(p,x,x^2))); Vec(p)} \\ Andrew Howroyd, May 07 2021

Formula

G.f.: x*A(x) where A(x) satisfies A(x) = 1 + x + x*(A(x)^2 - A(x^2)). - Andrew Howroyd, May 07 2021

Extensions

Terms a(13) and beyond from Andrew Howroyd, May 07 2021
Showing 1-10 of 11 results. Next