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

A118376 Number of all trees of weight n, where nodes have positive integer weights and the sum of the weights of the children of a node is equal to the weight of the node.

Original entry on oeis.org

1, 2, 6, 24, 112, 568, 3032, 16768, 95200, 551616, 3248704, 19389824, 117021824, 712934784, 4378663296, 27081760768, 168530142720, 1054464293888, 6629484729344, 41860283723776, 265346078982144, 1687918305128448, 10771600724946944, 68941213290561536
Offset: 1

Views

Author

Jeremy Johnson (jjohnson(AT)cs.drexel.edu), May 15 2006

Keywords

Comments

The number of trees with leaf nodes equal to 1 is counted by the sequence A001003 of super-Catalan numbers. The number of binary trees is counted by the sequence A007317 and the number of binary trees with leaf nodes equal to 1 is counted by the sequence A000108 of Catalan numbers.
Also the number of series-reduced enriched plane trees of weight n. A series-reduced enriched plane tree of weight n is either the number n itself or a finite sequence of at least two series-reduced enriched plane trees, one of each part of an integer composition of n. For example, the a(3) = 6 trees are: 3, (21), (12), (111), ((11)1), (1(11)). - Gus Wiseman, Sep 11 2018
Conjectured to be the number of permutations of length n avoiding the partially ordered pattern (POP) {1>2, 1>3, 3>4, 3>5} of length 5. That is, conjectured to be the number of length n permutations having no subsequences of length 5 in which the first element is the largest, and the third element is larger than the fourth and fifth elements. - Sergey Kitaev, Dec 13 2020
This conjecture has been proven. It can be restated as the number of size n permutations avoiding 51423, 51432, 52413, 52431, 53412, 53421, 54312, 54321. There are twelve sets of permutations avoiding eight size five permutations that are known to match this sequence. A further four are conjectured to match this sequence. - Christian Bean, Jul 24 2024

Examples

			T(3) = 6 because there are six trees
  3    3      3     3     3       3
      2 1    2 1   1 2   1 2    1 1 1
            1 1           1 1
From _Gus Wiseman_, Sep 11 2018: (Start)
The a(4) = 24 series-reduced enriched plane trees:
  4,
  (31), (13), (22), (211), (121), (112), (1111),
  ((21)1), ((12)1), (1(21)), (1(12)), (2(11)), ((11)2),
  ((111)1), (1(111)), ((11)(11)), ((11)11), (1(11)1), (11(11)),
  (((11)1)1), ((1(11))1), (1((11)1)), (1(1(11))).
(End)
		

Crossrefs

Programs

  • Maple
    T := proc(n) option remember; local C, s, p, tp, k, i; if n = 1 then return 1; else s := 1; for k from 2 to n do C := combinat[composition](n,k); for p in C do tp := map(T,p); s := s + mul(tp[i],i=1..nops(tp)); end do; end do; end if; return s; end;
  • Mathematica
    Rest[CoefficientList[Series[(Sqrt[1-8*x+8*x^2]-1)/(4*x-4), {x, 0, 20}], x]] (* Vaclav Kotesovec, Feb 03 2014 *)
    a[n_] := 1+Sum[Binomial[n-1, k-1]*Hypergeometric2F1[2-k, k+1, 2, -1], {k, 2, n}]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Apr 03 2015, after Vladimir Kruchinin *)
    urp[n_]:=Prepend[Join@@Table[Tuples[urp/@ptn],{ptn,Join@@Permutations/@Select[IntegerPartitions[n],Length[#]>1&]}],n];
    Table[Length[urp[n]],{n,7}] (* Gus Wiseman, Sep 11 2018 *)
  • Maxima
    a(n):=sum((-1)^j*2^(n-j-1)*binomial(n,j)*binomial(2*n-2*j-2,n-2*j-1),j,0,(n-1)/2)/n; /* Vladimir Kruchinin, Sep 29 2020 */
  • PARI
    x='x+O('x^25); Vec((sqrt(1-8*x+8*x^2) - 1)/(4*x-4)) \\ G. C. Greubel, Feb 08 2017
    

Formula

Recurrence: T(1) = 1; For n > 1, T(n) = 1 + Sum_{n=n1+...+nt} T(n1)*...*T(nt).
G.f.: (-1+(1-8*z+8*z^2)^(1/2))/(-4+4*z).
From Vladimir Kruchinin, Sep 03 2010: (Start)
O.g.f.: A(x) = A001003(x/(1-x)).
a(n) = Sum_{k=1..n} binomial(n-1,k-1)*A001003(k), n>0. (End)
D-finite with recurrence: n*a(n) + 3*(-3*n+4)*a(n-1) + 4*(4*n-9)*a(n-2) + 8*(-n+3)*a(n-3) = 0. - R. J. Mathar, Sep 27 2013
a(n) ~ sqrt(sqrt(2)-1) * 2^(n-1/2) * (2+sqrt(2))^(n-1) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Feb 03 2014
From Peter Bala, Jun 17 2015: (Start)
With offset 0, binomial transform of A001003.
O.g.f. A(x) = series reversion of x*(2*x - 1)/(2*x^2 - 1); 2*(1 - x)*A^2(x) - A(x) + x = 0.
A(x) satisfies the differential equation (x - 9*x^2 + 16*x^3 - 8*x^4)*A'(x) + x*(3 - 4*x)*A(x) + x*(2*x - 1) = 0. Extracting coefficients gives Mathar's recurrence above. (End)
a(n) = Sum_{j=0..(n-1)/2} (-1)^j*2^(n-j-1)*C(n,j)*C(2*n-2*j-2,n-2*j-1)/n. - Vladimir Kruchinin, Sep 29 2020

A083884 a(n) = (3^(2*n) + 1) / 2.

Original entry on oeis.org

1, 5, 41, 365, 3281, 29525, 265721, 2391485, 21523361, 193710245, 1743392201, 15690529805, 141214768241, 1270932914165, 11438396227481, 102945566047325, 926510094425921, 8338590849833285, 75047317648499561, 675425858836496045, 6078832729528464401
Offset: 0

Views

Author

Paul Barry, May 09 2003

Keywords

Comments

Number of compositions of even natural numbers into n parts <= 8. - Adi Dani, May 28 2011
a(n) for n >= 1 gives the number of line segments in the n-th iteration of the Peano curve given by plotting (A163528, A163529) or by (Siromoney 1982) when parallel line segments that are connected end-to-end are counted as a single line segment. - Jason V. Morgan, Oct 08 2021

Examples

			From _Adi Dani_, May 28 2011: (Start)
a(2)=41: there are 41 compositions of even natural numbers into 2 parts <=8:
(0,0);
(0,2),(2,0),(1,1);
(0,4),(4,0),(1,3),(3,1),(2,2);
(0,6),(6,0),(1,5),(5,1),(2,4),(4,2),(3,3);
(0,8),(8,0),(1,7),(7,1),(2,6),(6,2),(3,5),(5,3),(4,4);
(2,8),(8,2),(3,7),(7,3),(4,6),(6,4),(5,5);
(4,8),(8,4),(5,7),(7,5),(6,6);
(6,8),(8,6),(7,7);
(8,8).  (End)
		

References

  • Siromoney, R., & Subramanian, K.G. (1982). Space-filling curves and infinite graphs. Graph-Grammars and Their Application to Computer Science.

Crossrefs

Programs

Formula

a(0) = 1, a(n) = 9*a(n-1) - 4.
a(n) = Sum_{k=0..n} binomial(2*n, 2*k)*4^k.
a(n) = A002438(n) / A000364(n); A000364(n) : Euler numbers.
G.f.: (1-5*x)/((1-x)*(1-9*x)).
a(n) = (3^n + 1^n + (-1)^n + (-3)^n)/4.
E.g.f.: exp(3*x) + exp(x) + exp(-x) + exp(-3*x).
Each term expresses a Pythagorean relationship, along with (a(n)-1) and a power of 3, n>0, such that sqrt((a(n))^2 - (a(n)-1)^2) = 3^n. E.g., 365^2 - 364^2 - 3^3 = 27 (the Pythagorean triangle (365, 364, 27)). - Gary W. Adamson, Jun 25 2006
a(n) = 10*a(n-1) - 9*a(n-2). - Wesley Ivan Hurt, Apr 21 2021

Extensions

Additional comments from Philippe Deléham, Jul 10 2005

A032200 Number of rooted compound windmills (mobiles) of n nodes.

Original entry on oeis.org

1, 1, 2, 4, 9, 20, 51, 128, 345, 940, 2632, 7450, 21434, 62174, 182146, 537369, 1596133, 4767379, 14312919, 43162856, 130695821, 397184252, 1211057426, 3703794849, 11358759346, 34923477315, 107627138308, 332404636811
Offset: 1

Views

Author

Keywords

Comments

Also the number of locally necklace plane trees with n nodes, where a plane tree is locally necklace if the sequence of branches directly under any given node is lexicographically minimal among its cyclic permutations. - Gus Wiseman, Sep 05 2018

Examples

			From _Gus Wiseman_, Sep 05 2018: (Start)
The a(5) = 9 locally necklace plane trees:
  ((((o))))
  (((oo)))
  ((o(o)))
  (o((o)))
  ((o)(o))
  ((ooo))
  (o(oo))
  (oo(o))
  (oooo)
(End)
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 241 (3.3.84).

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    neckplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[neckplane/@c],neckQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[neckplane[n]],{n,10}] (* Gus Wiseman, Sep 05 2018 *)
  • PARI
    CIK(p,n)={sum(d=1, n, eulerphi(d)/d*log(subst(1/(1+O(x*x^(n\d))-p), x, x^d)))}
    seq(n)={my(p=O(1));for(i=1, n, p=1+CIK(x*p, i)); Vec(p)} \\ Andrew Howroyd, Jun 20 2018

Formula

Shifts left under "CIK" (necklace, indistinct, unlabeled) transform.

A102403 Number of Dyck paths of semilength n having no ascents of length 2.

Original entry on oeis.org

1, 1, 1, 2, 6, 17, 46, 128, 372, 1109, 3349, 10221, 31527, 98178, 308179, 973911, 3096044, 9894393, 31770247, 102444145, 331594081, 1077022622, 3509197080, 11466710630, 37567784437, 123380796192, 406120349756, 1339571374103
Offset: 0

Views

Author

Emeric Deutsch, Jan 06 2005

Keywords

Comments

Number of Łukasiewicz paths of length n having no (1,1) steps. A Łukasiewicz path of length n is a path in the first quadrant from (0,0) to (n,0) using rise steps (1,k) for any positive integer k, level steps (1,0) and fall steps (1,-1) (see R. P. Stanley, Enumerative Combinatorics, Vol. 2, Cambridge Univ. Press, Cambridge, 1999, p. 223, Exercise 6.19w; the integers are the slopes of the steps). Example: a(4)=6 because we have HHHH, HU(2)DD, U(2)DDH, U(2)DHD, U(2)HDD and U(3)DDD where H=(1,0), U(2)=(1,2), U(3)=(1,3) and D=(1,-1).
Also the number of series-reduced Mathematica expressions with one atom and n + 1 positions. Also the number of rooted plane trees with n + 1 nodes in which there are no binary branchings (nodes of out-degree 2). - Gus Wiseman, Aug 14 2018

Examples

			a(3)=2 because we have UDUDUD and UUUDDD, where U=(1,1) and D=(1,-1); the other three Dyck paths of semilength 3, namely UD(UU)DD, (UU)DDUD and (UU)DUDD, have ascents of length 2 (shown between parentheses).
From _Gus Wiseman_, Aug 14 2018: (Start)
The a(5) = 17 series-reduced Mathematica expressions:
  o[o[][],o]
  o[o,o[][]]
  o[o[],o[]]
  o[o[],o,o]
  o[o,o[],o]
  o[o,o,o[]]
  o[o,o,o,o]
  o[][o[],o]
  o[][o,o[]]
  o[][o,o,o]
  o[][][o,o]
  o[o[],o][]
  o[o,o[]][]
  o[o,o,o][]
  o[][o,o][]
  o[o,o][][]
  o[][][][][]
The a(5) = 17 rooted plane trees with no binary branchings:
  (((((o)))))
  (((ooo)))
  (((o)oo))
  ((o(o)o))
  ((oo(o)))
  ((oooo))
  (((o))oo)
  (o((o))o)
  (oo((o)))
  ((o)(o)o)
  ((o)o(o))
  (o(o)(o))
  ((o)ooo)
  (o(o)oo)
  (oo(o)o)
  (ooo(o))
  (ooooo)
(End)
		

Crossrefs

Programs

  • Maple
    Order:=35: S:=solve(series(V*(1-V)/(1-V^2+V^3),V)=z,V): seq(coeff(S,z^n),n=1..33); # V=zG
    P:= gfun:-rectoproc({(69*n^2+207*n+138)*a(n)+(97*n^2+609*n+830)*a(n+1)+(-38*n^2-342*n-694)*a(n+2)+(37*n^2+333*n+734)*a(n+3)+(2*n^2+18*n+34)*a(n+4)+(-7*n^2-87*n-266)*a(n+5)+(n^2+15*n+56)*a(n+6), a(0)=1,a(1)=1,a(2)=1,a(3)=2,a(4)=6,a(5)=17},a(n),remember):
    seq(P(n),n=0..50); # Robert Israel, Aug 24 2015
  • Mathematica
    a[n_] := 1/(n+1) Sum[Binomial[n+1, j] Binomial[3j-n-3, j-1] (-1)^(n+1-j), {j, n+1, (n+3)/3, -1}];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jul 21 2018, after Vladimir Kruchinin *)
  • Maxima
    a102403(n):=1/n*sum(binomial(n,j)*binomial(3*j-n-2,j-1)*(-1)^(n-j),j,ceiling((n+2)/3),n); /* Vladimir Kruchinin, Mar 07 2011 */
    
  • PARI
    Vec( serreverse( O(x^33) + x/(1+x/(1-x)-x^2) ) /x )  \\ Joerg Arndt, Apr 28 2016

Formula

G.f.: G=G(z) satisfies z^3*G^3 + z(1-z)G^2 - G + 1 = 0.
a(n) = (1/n)*Sum_{j=ceiling((n+2)/3)..n} binomial(n,j)*binomial(3*j-n-2,j-1)*(-1)^(n-j), n > 0. - Vladimir Kruchinin, Mar 07 2011
From Gary W. Adamson, Jan 30 2012: (Start)
a(n) is the upper left term in M^n, M = an infinite square production matrix as follows:
1, 1, 0, 0, 0, 0, ...
0, 1, 1, 0, 0, 0, ...
1, 0, 1, 1, 0, 0, ...
1, 1, 0, 1, 1, 0, ...
1, 1, 1, 0, 1, 1, ... (End)
(69*n^2+207*n+138)*a(n) + (97*n^2+609*n+830)*a(n+1) + (-38*n^2-342*n-694)*a(n+2) + (37*n^2+333*n+734)*a(n+3) + (2*n^2+18*n+34)*a(n+4) + (-7*n^2-87*n-266)*a(n+5) + (n^2+15*n+56)*a(n+6) = 0. - Robert Israel, Aug 24 2015
Recurrence (of order 4): (n+1)*(n+2)*(28*n^2 - 32*n - 39)*a(n) = 4*(n+1)*(14*n^3 - 9*n^2 - 62*n + 39)*a(n-1) + (140*n^4 - 160*n^3 - 401*n^2 + 469*n - 78)*a(n-2) - 12*(n-2)*(14*n^3 - 9*n^2 - 28*n - 8)*a(n-3) + 23*(n-3)*(n-2)*(28*n^2 + 24*n - 43)*a(n-4). - Vaclav Kotesovec, Mar 06 2016
a(n) ~ s * sqrt((1 - 2*r + 3*r^2*s)/(1 - r + 3*r^2*s)) /(2*sqrt(Pi)*n^(3/2)*r^n), where r = 0.2869905464691794898... and s = 1.850270202250705342... are roots of the system of equations 3*r^3*s^2 = 1 + 2*(-1 + r)*r*s, 1 + r^3*s^3 = s + (-1 + r)*r*s^2. - Vaclav Kotesovec, Mar 06 2016

A032171 Number of rooted compound windmills (mobiles) of n nodes with no symmetries.

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 23, 59, 148, 385, 1006, 2678, 7170, 19421, 52933, 145364, 401421, 1114713, 3109710, 8713076, 24506121, 69168705, 195849114, 556165311, 1583601840, 4520226558, 12931917204, 37075154703
Offset: 1

Views

Author

Keywords

Comments

Also the number of locally Lyndon plane trees with n nodes, where a plane tree is locally Lyndon if the sequence of branches directly under any given node is a Lyndon word. - Gus Wiseman, Sep 05 2018

Examples

			From _Gus Wiseman_, Sep 05 2018: (Start)
The a(6) = 10 locally Lyndon plane trees:
  (((((o)))))
  (((o(o))))
  ((o((o))))
  (o(((o))))
  ((o)((o)))
  ((oo(o)))
  (o(o(o)))
  (oo((o)))
  (o(o)(o))
  (ooo(o))
(End)
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := Module[{A}, A[, ] = 0; If[k < 1 || k > n, 0, For[j = 1, j <= n, j++, A[x_, y_] = x*y - x*Sum[MoebiusMu[i]/i * Log[1 -  A [x^i, y^i]] + O[x]^j // Normal , {i, 1, j}]]; Coefficient[Coefficient[A[x, y], x, n], y, k]]];
    a[n_] := a[n] = Sum[T[n, k], {k, 1, n}];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 28}] (* Jean-François Alcover, Jun 30 2017, using Michael Somos' code for A055363 *)
    LyndonQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
    lynplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[lynplane/@c],LyndonQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[lynplane[n]],{n,10}] (* Gus Wiseman, Sep 05 2018 *)
  • PARI
    CHK(p,n)={sum(d=1, n, moebius(d)/d*log(subst(1/(1+O(x*x^(n\d))-p), x, x^d)))}
    seq(n)={my(p=O(1));for(i=1, n, p=1+CHK(x*p, i)); Vec(p)} \\ Andrew Howroyd, Jun 20 2018

Formula

Shifts left under "CHK" (necklace, identity, unlabeled) transform.
From Petros Hadjicostas, Dec 03 2017: (Start)
a(n+1) = (1/n)*Sum_{d|n} mu(n/d)*c(d), where c(n) = n*a(n) + Sum_{s=1..n-1} c(s)*a(n-s) with a(1) = c(1) = 1.
G.f.: If A(x) = Sum_{n>=1} a(n)*x^n, then Sum_{n>=1} a(n+1)*x^n = -Sum_{n>=1} (mu(n)/n)*log(1-A(x^n)).
The g.f. of the auxiliary sequence (c(n): n>=1) is C(x) = Sum_{n>=1} c(n)*x^n = x*(dA(x)/dx)/(1-A(x)) = x + 3*x^2 + 7*x^3 + 19*x^4 + 51*x^5 + 147*x^6 + 414*x^7 + 1203*x^8 + ...
(End)

A303022 Number of free pure symmetric multifunctions (with empty expressions allowed) with one atom, n positions, and no unitary parts (subexpressions of the form x[y]).

Original entry on oeis.org

1, 1, 1, 2, 5, 12, 27, 63, 152, 376, 939, 2371, 6047, 15577, 40429, 105637, 277625, 733518, 1947126, 5190503, 13888811, 37291968, 100444019, 271316998, 734802247, 1994873116, 5427893149, 14799525982, 40429761365, 110645688034, 303316712450, 832799212777
Offset: 1

Views

Author

Gus Wiseman, Aug 15 2018

Keywords

Comments

Also the number of orderless Mathematica expressions with one atom, n positions, and no unitary parts.

Examples

			The a(6) = 12 Mathematica expressions:
  o[o,o[][]]
  o[o[],o[]]
  o[o,o,o[]]
  o[o,o,o,o]
  o[][o,o[]]
  o[][o,o,o]
  o[][][o,o]
  o[o,o[]][]
  o[o,o,o][]
  o[][o,o][]
  o[o,o][][]
  o[][][][][]
		

Crossrefs

Programs

  • Mathematica
    allOLBF[n_]:=allOLBF[n]=If[n==1,{"o"},Join@@Cases[Table[PR[k,n-k-1],{k,n-1}],PR[h_,g_]:>Join@@Table[Apply@@@Tuples[{allOLBF[h],Select[Union[Sort/@Tuples[allOLBF/@p]],Length[#]!=1&]}],{p,IntegerPartitions[g]}]]];
    Table[Length[allOLBF[n]],{n,10}]
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    seq(n)={my(v=[1]); for(n=2, n, my(t=EulerT(v)-v); v=concat(v, v[n-1] + sum(k=1, n-2, v[k]*t[n-k-1]))); v} \\ Andrew Howroyd, Aug 19 2018

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 19 2018

A303027 Number of free pure symmetric multifunctions with one atom, n positions, and no empty or unitary parts (subexpressions of the form x[] or x[y]).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 3, 5, 7, 15, 28, 47, 90, 175, 319, 607, 1181, 2251, 4325, 8449, 16425, 31992, 62823, 123521, 243047, 480316, 951290, 1886293, 3749341, 7467815, 14893500, 29752398, 59532947, 119274491, 239275400, 480638121, 966571853, 1945901716, 3921699524
Offset: 1

Views

Author

Gus Wiseman, Aug 15 2018

Keywords

Comments

Also the number of orderless Mathematica expressions with one atom, n positions, and no empty or unitary parts.

Examples

			The a(10) = 15 Mathematica expressions:
  o[o,o[o,o[o,o]]]
  o[o,o[o,o][o,o]]
  o[o[o,o],o[o,o]]
  o[o,o][o,o[o,o]]
  o[o,o[o,o]][o,o]
  o[o,o][o,o][o,o]
  o[o,o[o,o,o,o,o]]
  o[o,o,o[o,o,o,o]]
  o[o,o,o,o[o,o,o]]
  o[o,o,o,o,o[o,o]]
  o[o,o][o,o,o,o,o]
  o[o,o,o][o,o,o,o]
  o[o,o,o,o][o,o,o]
  o[o,o,o,o,o][o,o]
  o[o,o,o,o,o,o,o,o]
		

Crossrefs

Programs

  • Mathematica
    allOLZR[n_]:=allOLZR[n]=If[n==1,{"o"},Join@@Cases[Table[PR[k,n-k-1],{k,n-1}],PR[h_,g_]:>Join@@Table[Apply@@@Tuples[{allOLZR[h],Select[Union[Sort/@Tuples[allOLZR/@p]],Length[#]>1&]}],{p,IntegerPartitions[g]}]]];
    Table[Length[allOLZR[n]],{n,25}]
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    seq(n)={my(v=[1]); for(n=2, n, my(t=EulerT(v)-v); v=concat(v, sum(k=1, n-2, v[k]*t[n-k-1]))); v} \\ Andrew Howroyd, Aug 19 2018

Extensions

Terms a(29) and beyond from Andrew Howroyd, Aug 19 2018

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

A318049 Number of first/rest balanced rooted plane trees with n nodes.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 3, 2, 6, 8, 11, 26, 28, 67, 96, 162, 316, 448, 922, 1435, 2572, 4660, 7563, 14397, 23896, 43337, 77097, 133071, 244787, 423093, 767732, 1367412, 2426612, 4408497, 7802348, 14152342, 25365035, 45602031, 82631362, 148246136, 269103870, 485379304
Offset: 1

Views

Author

Gus Wiseman, Aug 13 2018

Keywords

Comments

A rooted plane tree is first/rest balanced if either (1) it is a single node, or (2a) the number of leaves in the first branch is equal to the number of branches minus one, and (2b) every branch is also first/rest balanced.
Also the number of composable free pure multifunctions (CPMs) with one atom and n positions. A CPM is either (case 1) the leaf symbol "o", or (case 2) an expression of the form h[g_1, ..., g_k] where h and each of the g_i for i = 1, ..., k > 0 are CPMs, and the number of leaves in h is equal to k. The number of positions in a CPM is the number of brackets [...] plus the number of o's.

Examples

			The a(12) = 11 first/rest balanced rooted plane trees:
  (o(o(o((oo)oo))))
  (o(o((oo)(oo)o)))
  (o(o((oo)o(oo))))
  (o((oo)(o(oo))o))
  (o((oo)o(o(oo))))
  (o((oo)(oo)(oo)))
  ((oo)(o(o(oo)))o)
  ((oo)o(o(o(oo))))
  ((o(o(oo)))oooo)
  ((oo)(o(oo))(oo))
  ((oo)(oo)(o(oo)))
The a(12) = 11 composable free pure multifunctions:
  o[o[o[o[o][o,o]]]]
  o[o[o[o][o[o],o]]]
  o[o[o[o][o,o[o]]]]
  o[o[o][o[o[o]],o]]
  o[o[o][o,o[o[o]]]]
  o[o[o][o[o],o[o]]]
  o[o][o[o[o[o]]],o]
  o[o][o,o[o[o[o]]]]
  o[o][o[o[o]],o[o]]
  o[o][o[o],o[o[o]]]
  o[o[o[o]]][o,o,o,o]
		

Crossrefs

Programs

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

Formula

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

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jan 22 2021
Showing 1-10 of 16 results. Next