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.

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

A036249 Number of rooted trees of nonempty sets with n points. (Each node is a set of 1 or more points.)

Original entry on oeis.org

0, 1, 2, 5, 13, 37, 108, 332, 1042, 3360, 11019, 36722, 123875, 422449, 1453553, 5040816, 17599468, 61814275, 218252584, 774226549, 2758043727, 9862357697, 35387662266, 127374191687, 459783039109, 1664042970924, 6037070913558, 21951214425140, 79981665585029
Offset: 0

Views

Author

Christian G. Bower, Nov 15 1998

Keywords

Crossrefs

Essentially the same as A029856. Cf. A048802. Row sums of A303911.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(b(n-j)*
          add(d*a(d), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+b(n-1)) end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jun 13 2018
  • Mathematica
    max = 27; A[] = 1; Do[A[x] = x*Exp[Sum[(A[x^k] + x^k)/k + O[x]^n, {k, 1, n}]] // Normal, {n, 1, max}]; CoefficientList[A[x] + O[x]^max, x] (* Jean-François Alcover, May 25 2018 *)
  • PARI
    {a(n)=local(A=x+x*O(x^n));for(i=1,n, A=x*exp(sum(m=1,n,(subst(A,x,x^m)+x^m)/m)));polcoeff(A,n,x)} \\ Paul D. Hanna, Oct 19 2005

Formula

G.f. satisfies: A(x) = x*exp( Sum_{n>=1} (A(x^n) + x^n)/n ). - Paul D. Hanna, Oct 19 2005
If b(n) is the Euler transform of a(n), A052855, then a(n+1) = a(n) + b(n). - Franklin T. Adams-Watters, Mar 09 2006
G.f.: (x/(1 - x)) * Product_{n>=1} 1/(1 - x^n)^a(n). - Ilya Gutkovskiy, Jun 28 2021

A038049 Number of labeled rooted trees with 2-colored leaves.

Original entry on oeis.org

2, 4, 24, 224, 2880, 47232, 942592, 22171648, 600698880, 18422374400, 630897721344, 23864653578240, 988197253808128, 44460603225407488, 2159714024218951680, 112652924603290615808, 6280048587936003784704, 372616014329572403183616, 23445082059018189741752320
Offset: 1

Views

Author

Christian G. Bower, Jan 04 1999

Keywords

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 185 (3.1.83)

Crossrefs

Programs

  • Maple
    a:= n-> add(binomial(n, k)*(n-k)^(n-1), k=0..n):
    seq(a(n), n=1..20);  # Alois P. Heinz, Nov 30 2012
  • Mathematica
    Table[n!*Sum[2^j/j!*StirlingS2[n-1,n-j],{j,1,n}],{n,1,20}] (* Vaclav Kotesovec, Nov 30 2012 *)

Formula

Divides by n and shifts left under exponential transform.
E.g.f.: A(x) = x-LambertW(-x*exp(x)). - Vladeta Jovovic, Mar 08 2003
a(n) = Sum_{k=0..n} (binomial(n, k)*(n-k)^(n-1)).
A(x) = 2*compositional inverse of 2*x/(1+exp(2*x)). - Peter Bala, Oct 14 2011
a(n) ~ n^(n-1) * sqrt((1+LambertW(1/e))) / (e*LambertW(1/e))^n. - Vaclav Kotesovec, Nov 30 2012

A052855 Number of forests of rooted trees of nonempty sets with n points. (Each node is a set of 1 or more points.)

Original entry on oeis.org

1, 1, 3, 8, 24, 71, 224, 710, 2318, 7659, 25703, 87153, 298574, 1031104, 3587263, 12558652, 44214807, 156438309, 555973965, 1983817178, 7104313970, 25525304569, 91986529421, 332408847422, 1204259931815, 4373027942634, 15914143511582, 58030451159889
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Euler transform of A036249 (as well as first differences thereof). - Franklin T. Adams-Watters, Feb 08 2006

Crossrefs

First differences of A036249 and A029856.

Programs

  • Maple
    spec := [S,{B=Sequence(Z,1 <= card),S=Set(C),C=Prod(B,S)},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    max = 26; A[] = 1; Do[A[x] = Exp[Sum[A[x^k]/(1 - x^k)*x^k/k + O[x]^n, {k, 1, n}]] // Normal, {n, 1, max}]; CoefficientList[A[x] + O[x]^max, x] (* Jean-François Alcover, May 25 2018 *)
  • PARI
    {a(n)=my(A=1+x);for(i=1,n,A=exp(sum(m=1,n,subst(A/(1-x),x,x^m+x*O(x^n))*x^m/m)));polcoeff(A,n)} /* Paul D. Hanna, Oct 26 2011 */

Formula

G.f. satisfies A(x) = exp( Sum_{n>=1} A(x^n)/(1-x^n) * x^n/n ). - Paul D. Hanna, Oct 26 2011
G.f.: A(x) = Sum_{k>=0} a(k) * x^k = 1/Product_{j>=1} Product_{k>=0} (1-x^(j+k))^a(k). - Seiichi Manyama, Jun 07 2023

Extensions

More terms from Franklin T. Adams-Watters, Feb 08 2006

A029857 Number of rooted trees with 3-colored leaves.

Original entry on oeis.org

3, 3, 9, 28, 94, 328, 1197, 4486, 17235, 67429, 267932, 1078003, 4383784, 17987897, 74385984, 309694232, 1297037177, 5460726214, 23098296648, 98113995068, 418335662448, 1789814398035, 7681522429474, 33061825858259, 142674028869587, 617180102839217
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): a:= proc(n) option remember; local d,j; if n<=1 then 3*n else (add(d*a(d), d=divisors(n-1)) +add(add(d*a(d), d=divisors(j)) *a(n-j), j=1..n-2))/ (n-1) fi end: seq(a(n), n=1..30); # Alois P. Heinz, Sep 06 2008
  • Mathematica
    a[n_] := a[n] = If[n<=1, 3*n, (Sum[d*a[d], {d, Divisors[n-1]}] + Sum[Sum[ d*a[d], {d, Divisors[j]}]*a[n-j], {j, 1, n-2}])/(n-1)]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Feb 21 2016 *)

Formula

Shifts left under Euler transform.
a(n) ~ c * d^n / n^(3/2), where d = 4.58859196701042554480382685... and c = 0.5102557157321640697473838... - Vaclav Kotesovec, Mar 29 2014
G.f. A(x) satisfies: A(x) = 2*x + x * exp( Sum_{k>=1} A(x^k) / k ). - Ilya Gutkovskiy, May 19 2023

A036251 Number of trees with 2-colored leaves.

Original entry on oeis.org

1, 2, 3, 3, 7, 14, 35, 85, 231, 633, 1845, 5461, 16707, 51945, 164695, 529077, 1722279, 5664794, 18813369, 62996850, 212533226, 721792761, 2466135375, 8471967938, 29249059293, 101440962296, 353289339927, 1235154230060
Offset: 0

Views

Author

Christian G. Bower, Nov 15 1998

Keywords

Crossrefs

Essentially the same as A036250. Cf. A038054.

Programs

  • Mathematica
    max = 30; B[] = 1; Do[B[x] = x*Exp[Sum[(B[x^k] + x^k)/k + O[x]^n, {k, 1, n}]] // Normal, {n, 1, max}]; A[x_] = 1 + x + x^2 + B[x] - B[x]^2/2 + B[x^2]/2; CoefficientList[A[x] + O[x]^max, x] (* Jean-François Alcover, Jan 28 2019 *)

Formula

G.f.: B(x) + B(x)^2/2 + B(x^2)/2 - B(x)*(B(x)-x), where B(x) is g.f. for A029856.

A318151 e-numbers of unlabeled rooted trees with empty leaves o[] allowed. A number n is in the sequence iff n = 2^(prime(y_1) * ... * prime(y_k)) for some k >= 0 and y_1, ..., y_k already in the sequence.

Original entry on oeis.org

1, 2, 4, 8, 16, 64, 128, 256, 512, 4096, 16384, 65536, 262144, 524288, 2097152, 16777216, 134217728, 268435456, 4294967296, 68719476736, 274877906944, 4398046511104, 281474976710656, 562949953421312, 9007199254740992, 18014398509481984, 72057594037927936
Offset: 1

Views

Author

Gus Wiseman, Aug 19 2018

Keywords

Comments

If n = 1 let e(n) be the leaf symbol "o". Given a positive integer n > 1 we construct a unique orderless expression e(n) (as can be represented in functional programming languages such as Mathematica) with one atom by expressing n as a power of a number that is not a perfect power to a product of prime numbers: n = rad(x)^(prime(y_1) * ... * prime(y_k)) where rad = A007916. Then e(n) = e(x)[e(y_1), ..., e(y_k)]. For example, e(21025) = o[o[o]][o] because 21025 = rad(rad(1)^prime(rad(1)^prime(1)))^prime(1). The sequence consists of all numbers n such that e(n) contains no subexpressions in heads f[x_1, ..., x_k][y_1, ..., y_k] where k,j >= 0.

Crossrefs

A308227 G.f.: (x/(1 - x)) * Product_{k>=1} ((1 + x^k)/(1 - x^k))^a(k).

Original entry on oeis.org

1, 3, 11, 47, 217, 1065, 5453, 28789, 155633, 857207, 4793103, 27136555, 155249971, 896133487, 5212477023, 30522169103, 179777122393, 1064411910393, 6331361864657, 37817265028841, 226731778956181, 1363993567341257, 8231111557650837, 49812263080757845
Offset: 1

Views

Author

Ilya Gutkovskiy, May 16 2019

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = SeriesCoefficient[x/(1 - x) Product[((1 + x^k)/(1 - x^k))^a[k], {k, 1, n - 1}], {x, 0, n}]; Table[a[n], {n, 1, 24}]
    terms = 24; A[] = 0; Do[A[x] = x Exp[Sum[2 A[x^(2 k - 1)]/(2 k - 1) + x^k/k, {k, 1, terms}]] + O[x]^(terms + 1) // Normal, terms + 1]; CoefficientList[A[x], x] // Rest

Formula

G.f. A(x) satisfies: A(x) = x * exp(Sum_{k>=1} 2*A(x^(2*k-1))/(2*k - 1) + x^k/k).
Showing 1-8 of 8 results.