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 10 results.

A001190 Wedderburn-Etherington numbers: unlabeled binary rooted trees (every node has outdegree 0 or 2) with n endpoints (and 2n-1 nodes in all).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 6, 11, 23, 46, 98, 207, 451, 983, 2179, 4850, 10905, 24631, 56011, 127912, 293547, 676157, 1563372, 3626149, 8436379, 19680277, 46026618, 107890609, 253450711, 596572387, 1406818759, 3323236238, 7862958391, 18632325319, 44214569100, 105061603969
Offset: 0

Views

Author

Keywords

Comments

Also number of n-node binary rooted trees (every node has outdegree <= 2) where root has degree 0 (only for n=1) or 1.
a(n+1) is the number of rooted trees with n nodes where the outdegree of every node is <= 2, see example. These trees are obtained by removing the root of the trees in the comment above. - Joerg Arndt, Jun 29 2014
Number of interpretations of x^n (or number of ways to insert parentheses) when multiplication is commutative but not associative. E.g., a(4) = 2: x(x*x^2) and x^2*x^2. a(5) = 3: (x*x^2)x^2, x(x*x*x^2) and x(x^2*x^2). [If multiplication is non-commutative then the answer is A000108(n-1). - Jianing Song, Apr 29 2022]
Number of ways to place n stars in a single bound stable hierarchical multiple star system; i.e., taking only the configurations from A003214 where all stars are included in single outer parentheses. - Piet Hut, Nov 07 2003
Number of colorations of Kn (complete graph of order n) with n-1 colors such that no triangle is three-colored. Two edge-colorations C1 and C2 of G are isomorphic iff exists an automorphism f (isomorphism between G an G) such that: f sends same-colored edges of C1 on same-colored edges of C2 and f^(-1) sends same-colored edges of C2 on same-colored edges of C1. - Abraham Gutiérrez, Nov 12 2012
For n>1, a(n) is the number of (not necessarily distinct) unordered pairs of free unlabeled trees having a total of n nodes. See the first entry in formula section. - Geoffrey Critzer, Nov 09 2014
Named after the English mathematician Ivor Etherington (1908-1994) and the Scottish mathematician Joseph Wedderburn (1882-1948). - Amiram Eldar, May 29 2021

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 11*x^7 + 23*x^8 + 46*x^9 + 98*x^10 + ...
From _Joerg Arndt_, Jun 29 2014: (Start)
The a(6+1) = 11 rooted trees with 6 nodes as described in the comment are:
:           level sequence       outdegrees (dots for zeros)
:     1:  [ 0 1 2 3 4 5 ]    [ 1 1 1 1 1 . ]
:  O--o--o--o--o--o
:
:     2:  [ 0 1 2 3 4 4 ]    [ 1 1 1 2 . . ]
:  O--o--o--o--o
:           .--o
:
:     3:  [ 0 1 2 3 4 3 ]    [ 1 1 2 1 . . ]
:  O--o--o--o--o
:        .--o
:
:     4:  [ 0 1 2 3 4 2 ]    [ 1 2 1 1 . . ]
:  O--o--o--o--o
:     .--o
:
:     5:  [ 0 1 2 3 4 1 ]    [ 2 1 1 1 . . ]
:  O--o--o--o--o
:  .--o
:
:     6:  [ 0 1 2 3 3 2 ]    [ 1 2 2 . . . ]
:  O--o--o--o
:        .--o
:     .--o
:
:     7:  [ 0 1 2 3 3 1 ]    [ 2 1 2 . . . ]
:  O--o--o--o
:        .--o
:  .--o
:
:     8:  [ 0 1 2 3 2 3 ]    [ 1 2 1 . 1 . ]
:  O--o--o--o
:     .--o--o
:
:     9:  [ 0 1 2 3 2 1 ]    [ 2 2 1 . . . ]
:  O--o--o--o
:     .--o
:  .--o
:
:    10:  [ 0 1 2 3 1 2 ]    [ 2 1 1 . 1 . ]
:  O--o--o--o
:  .--o--o
:
:    11:  [ 0 1 2 2 1 2 ]    [ 2 2 . . 1 . ]
:  O--o--o
:     .--o
:  .--o--o
:
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 307.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 55.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 295-316.
  • A. Gutiérrez-Sánchez, Shen-colored tournaments, thesis, UNAM, 2012.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.52.
  • Richard P. Stanley, Catalan Numbers, Cambridge, 2015, p. 133.

Crossrefs

Column k=2 of A292085 and of A299038.
Column k=1 of A319539 and of A319541.

Programs

  • Maple
    A001190 := proc(n) option remember; local s,k; if n<=1 then RETURN(n); elif n <=3 then RETURN(1); else s := 0; if n mod 2 = 0 then s := A001190(n/2)*(A001190(n/2)+1)/2; for k from 1 to n/2-1 do s := s+A001190(k)*A001190(n-k); od; RETURN(s); else for k from 1 to (n-1)/2 do s := s+A001190(k)*A001190(n-k); od; RETURN(s); fi; fi; end;
    N := 40: G001190 := add(A001190(n)*x^n,n=0..N);
    spec := [S,{S=Union(Z,Prod(Z,Set(S,card=2)))},unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
    # alternative Maple program:
    a:= proc(n) option remember; `if`(n<2, n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(a(n/2)))+add(a(i)*a(n-i), i=1..n/2))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Aug 28 2017
  • Mathematica
    terms = 35; A[] = 0; Do[A[x] = x + (1/2)*(A[x]^2 + A[x^2]) + O[x]^terms // Normal, terms]; CoefficientList[A[x], x] (* Jean-François Alcover, Jul 22 2011, updated Jan 10 2018 *)
    a[n_?OddQ] := a[n] = Sum[a[k]*a[n-k], {k, 1, (n-1)/2}]; a[n_?EvenQ] := a[n] = Sum[a[k]*a[n-k], {k, 1, n/2-1}] + (1/2)*a[n/2]*(1+a[n/2]); a[0]=0; a[1]=1; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Jun 13 2012, after recurrence formula *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Nest[ 1 - Sqrt[1 - 2 x - (# /. x -> x^2)] &, 0, BitLength @ n], {x, 0, n}]]; (* Michael Somos, Apr 25 2013 *)
  • PARI
    {a(n) = local(A, m); if( n<0, 0, m=1; A = O(x); while( m<=n, m*=2; A = 1 - sqrt(1 - 2*x - subst(A, x, x^2))); polcoeff(A, n))}; /* Michael Somos, Sep 06 2003 */
    
  • PARI
    {a(n) = local(A); if( n<4, n>0, A = vector(n, i, 1); for( i=4, n, A[i] = sum( j=1, (i-1)\2, A[j] * A[i-j]) + if( i%2, 0, A[i/2] * (A[i/2] + 1)/2)); A[n])}; /* Michael Somos, Mar 25 2006 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A001190(n):
        if n <= 1: return n
        m = n//2 + n % 2
        return sum(A001190(i+1)*A001190(n-1-i) for i in range(m-1)) + (1 - n % 2)*A001190(m)*(A001190(m)+1)//2 # Chai Wah Wu, Jan 14 2022

Formula

G.f. satisfies A(x) = x + (1/2)*(A(x)^2 + A(x^2)) [de Bruijn and Klarner].
G.f. also satisfies A(x) = 1 - sqrt(1 - 2*x - A(x^2)). - Michael Somos, Sep 06 2003
a(2n-1) = a(1)a(2n-2) + a(2)a(2n-3) + ... + a(n-1)a(n), a(2n) = a(1)a(2n-1) + a(2)a(2n-2) + ... + a(n-1)a(n+1) + a(n)(a(n)+1)/2.
Given g.f. A(x), then B(x) = -1 + A(x) satisfies 0 = f(B(x), B(x^2), B(x^4)) where f(u, v, w) = (u^2 + v)^2 + 2*(v^2 + w). - Michael Somos, Oct 22 2006
The radius of convergence of the g.f. is A240943 = 1/A086317 ~ 0.4026975... - Jean-François Alcover, Jul 28 2014, after Steven R. Finch.
a(n) ~ A086318 * A086317^(n-1) / n^(3/2). - Vaclav Kotesovec, Apr 19 2016

A319539 Array read by antidiagonals: T(n,k) is the number of binary rooted trees with n leaves of k colors and all non-leaf nodes having out-degree 2.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 6, 2, 5, 10, 18, 18, 3, 6, 15, 40, 75, 54, 6, 7, 21, 75, 215, 333, 183, 11, 8, 28, 126, 495, 1260, 1620, 636, 23, 9, 36, 196, 987, 3600, 8010, 8208, 2316, 46, 10, 45, 288, 1778, 8568, 28275, 53240, 43188, 8610, 98, 11, 55, 405, 2970, 17934, 80136, 232500, 366680, 232947, 32763, 207
Offset: 1

Views

Author

Andrew Howroyd, Sep 22 2018

Keywords

Comments

Not all k colors need to be used. The total number of nodes will be 2n-1.
See table 2.1 in the Johnson reference.

Examples

			Array begins:
===========================================================
n\k|  1    2      3       4        5        6         7
---+-------------------------------------------------------
1  |  1    2      3       4        5        6         7 ...
2  |  1    3      6      10       15       21        28 ...
3  |  1    6     18      40       75      126       196 ...
4  |  2   18     75     215      495      987      1778 ...
5  |  3   54    333    1260     3600     8568     17934 ...
6  |  6  183   1620    8010    28275    80136    194628 ...
7  | 11  636   8208   53240   232500   785106   2213036 ...
8  | 23 2316  43188  366680  1979385  7960638  26037431 ...
9  | 46 8610 232947 2590420 17287050 82804806 314260765 ...
...
		

Crossrefs

Columns 1..5 are A001190, A083563, A220816, A220817, A220818.
Main diagonal is A319580.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n<2, k*n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(A(n/2, k)))+add(A(i, k)*A(n-i, k), i=1..n/2))
        end:
    seq(seq(A(n, 1+d-n), n=1..d), d=1..12);  # Alois P. Heinz, Sep 23 2018
  • Mathematica
    A[n_, k_] := A[n, k] = If[n<2, k*n, If[OddQ[n], 0, (#*(1-#)/2&)[A[n/2, k]]] + Sum[A[i, k]*A[n-i, k], {i, 1, n/2}]];
    Table[A[n, d-n+1], {d, 1, 12}, {n, 1, d}] // Flatten (* Jean-François Alcover, Sep 02 2019, after Alois P. Heinz *)
  • PARI
    \\ here R(n,k) gives k-th column as a vector.
    R(n,k)={my(v=vector(n)); v[1]=k; for(n=2, n, v[n]=sum(j=1, (n-1)\2, v[j]*v[n-j]) + if(n%2, 0, binomial(v[n/2]+1, 2))); v}
    {my(T=Mat(vector(8, k, R(8, k)~))); for(n=1, #T~, print(T[n,]))}

Formula

T(1,k) = k.
T(n,k) = (1/2)*([n mod 2 == 0]*T(n/2,k) + Sum_{j=1..n-1} T(j,k)*T(n-j,k)).
G.f. of k-th column R(x) satisfies R(k) = k*x + (R(x)^2 + R(x^2))/2.

A319376 Triangle read by rows: T(n,k) is the number of lone-child-avoiding rooted trees with n leaves of exactly k colors.

Original entry on oeis.org

1, 1, 1, 2, 6, 4, 5, 30, 51, 26, 12, 146, 474, 576, 236, 33, 719, 3950, 8572, 8060, 2752, 90, 3590, 31464, 108416, 175380, 134136, 39208, 261, 18283, 245916, 1262732, 3124650, 4014348, 2584568, 660032, 766, 94648, 1908858, 14047288, 49885320, 95715728, 101799712, 56555904, 12818912
Offset: 1

Views

Author

Andrew Howroyd, Sep 17 2018

Keywords

Comments

Lone-child-avoiding rooted trees are also called planted series-reduced trees in some other sequences.

Examples

			Triangle begins:
    1;
    1,     1;
    2,     6,      4;
    5,    30,     51,      26;
   12,   146,    474,     576,     236;
   33,   719,   3950,    8572,    8060,   2752;
   90,  3590,  31464,  108416,  175380,  134136,   39208;
  261, 18283, 245916, 1262732, 3124650, 4014348, 2584568, 660032;
  ...
From _Gus Wiseman_, Dec 31 2020: (Start)
The 12 trees counted by row n = 3:
  (111)    (112)    (123)
  (1(11))  (122)    (1(23))
           (1(12))  (2(13))
           (1(22))  (3(12))
           (2(11))
           (2(12))
(End)
		

Crossrefs

Columns k=1..2 are A000669, A319377.
Main diagonal is A000311.
Row sums are A316651.
The unlabeled version, counting inequivalent leaf-colorings of lone-child-avoiding rooted trees, is A330465.
Lone-child-avoiding rooted trees are counted by A001678 (shifted left once).
Labeled lone-child-avoiding rooted trees are counted by A060356.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(A(i, k)+j-1, j)*b(n-i*j, i-1, k), j=0..n/i)))
        end:
    A:= (n, k)-> `if`(n<2, n*k, b(n, n-1, k)):
    T:= (n, k)-> add(A(n, k-j)*(-1)^j*binomial(k, j), j=0..k-1):
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Sep 18 2018
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[A[i, k] + j - 1, j] b[n - i j, i - 1, k], {j, 0, n/i}]]];
    A[n_, k_] := If[n < 2, n k, b[n, n - 1, k]];
    T[n_, k_] := Sum[(-1)^(k - i)*Binomial[k, i]*A[n, i], {i, 1, k}];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 24 2019, after Alois P. Heinz *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    mtot[m_]:=Prepend[Join@@Table[Tuples[mtot/@p],{p,Select[mps[m],1Gus Wiseman, Dec 31 2020 *)
  • PARI
    \\ here R(n,k) is k-th column of A319254.
    EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
    R(n, k)={my(v=[k]); for(n=2, n, v=concat(v, EulerT(concat(v, [0]))[n])); v}
    M(n)={my(v=vector(n, k, R(n,k)~)); Mat(vector(n, k, sum(i=1, k, (-1)^(k-i)*binomial(k,i)*v[i])))}
    {my(T=M(10)); for(n=1, #T~, print(T[n, ][1..n]))}

Formula

T(n,k) = Sum_{i=1..k} (-1)^(k-i)*binomial(k,i)*A319254(n,i).
Sum_{k=1..n} k * T(n,k) = A326396(n). - Alois P. Heinz, Sep 11 2019

A339650 Triangle read by rows: T(n,k) is the number of trees with n leaves of exactly k colors and all non-leaf nodes having degree 3.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 6, 3, 0, 1, 10, 30, 36, 15, 0, 2, 27, 140, 310, 300, 105, 0, 2, 74, 663, 2376, 3990, 3150, 945, 0, 4, 226, 3186, 17304, 44850, 59805, 39690, 10395, 0, 6, 710, 15642, 123508, 462735, 925890, 1018710, 582120, 135135
Offset: 0

Views

Author

Andrew Howroyd, Dec 14 2020

Keywords

Comments

See table 4.2 in the Johnson reference.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   2,    1;
  0, 1,   4,    6,     3;
  0, 1,  10,   30,    36,    15;
  0, 2,  27,  140,   310,   300,   105;
  0, 2,  74,  663,  2376,  3990,  3150,   945;
  0, 4, 226, 3186, 17304, 44850, 59805, 39690, 10395;
  ...
		

Crossrefs

Columns k=1..4 are A129860, A220829, A220830, A220831.
Main diagonal is A001147(n-2) for n >= 2.
Row sums are A339651.
Cf. A319541 (rooted), A339649, A339780.

Programs

  • PARI
    \\ here U(n,k) is column k of A339649 as a vector.
    R(n, k)={my(v=vector(n)); v[1]=k; for(n=2, n, v[n]=sum(j=1, (n-1)\2, v[j]*v[n-j]) + if(n%2, 0, binomial(v[n/2]+1, 2))); v}
    U(n, k)={my(g=x*Ser(R(n, k))); Vec(1 + g + (subst(g + O(x*x^(n\3)), x, x^3) - g^3)/3)}
    M(n, m=n)={my(v=vector(m+1, k, U(n, k-1)~)); Mat(vector(m+1, k, k--; sum(i=0, k, (-1)^(k-i)*binomial(k, i)*v[1+i])))}
    {my(T=M(10)); for(n=1, #T~, print(T[n, ][1..n]))}

Formula

T(n,k) = Sum_{i=0..k} (-1)^(k-i)*binomial(k,i)*A339649(n,i).

A319590 Number of binary rooted trees with n leaves spanning an initial interval of positive integers and all non-leaf nodes having out-degree 2.

Original entry on oeis.org

1, 2, 8, 58, 576, 7440, 117628, 2201014, 47552012, 1164812674, 31898271660, 965666303078, 32022547868872, 1154362247246714, 44945574393963472, 1879720975031634318, 84039891496643620196, 3999886612000379135606, 201919706444252727224852, 10775953237291840618917900
Offset: 1

Views

Author

Andrew Howroyd, Sep 23 2018

Keywords

Crossrefs

Row sums of A319541.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<2, k*n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(b(n/2, k)))+add(b(i, k)*b(n-i, k), i=1..n/2))
        end:
    a:= n-> add(add((-1)^i*binomial(k, i)*b(n, k-i), i=0..k), k=0..n):
    seq(a(n), n=1..23);  # Alois P. Heinz, Sep 07 2019
  • Mathematica
    b[n_, k_] := b[n, k] = If[n < 2, k n, If[OddQ[n], 0, Function[t, t(1 - t)/2][b[n/2, k]]] + Sum[b[i, k] b[n - i, k], {i, 1, n/2}]];
    a[n_] := Sum[Sum[(-1)^i Binomial[k, i] b[n, k - i], {i, 0, k}], {k, 0, n}];
    Array[a, 23] (* Jean-François Alcover, Apr 10 2020, after Alois P. Heinz *)
  • PARI
    \\ here R(n, k) is k-th column of A319539 as a vector.
    R(n, k)={my(v=vector(n)); v[1]=k; for(n=2, n, v[n]=sum(j=1, (n-1)\2, v[j]*v[n-j]) + if(n%2, 0, binomial(v[n/2]+1, 2))); v}
    seq(n)={sum(k=1, n, R(n, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) )}

A220819 Number of rooted binary leaf-multilabeled trees with n leaves on the label set [2].

Original entry on oeis.org

0, 1, 4, 14, 48, 171, 614, 2270, 8518, 32567, 126168, 495079, 1962752, 7853581, 31672502, 128622480, 525523990, 2158818376, 8911039462, 36941520279, 153740822408, 642085403709, 2690217364606, 11304538078369, 47630350694248, 201181246749072, 851690546714230
Offset: 1

Views

Author

N. J. A. Sloane, Dec 22 2012

Keywords

Crossrefs

Column k=2 of A319541.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<2, k*n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(b(n/2, k)))+add(b(i, k)*b(n-i, k), i=1..n/2))
        end:
    a:= n-> b(n, 2)-2*b(n, 1):
    seq(a(n), n=1..40);  # Alois P. Heinz, Sep 07 2019
  • Mathematica
    (* b = A083563 *) b[n_] := b[n] = If[n < 2, 2*n, If[OddQ[n], 0, #*(1 - #)/2 &[b[n/2]]]] + Sum[b[i]*b[n - i], {i, 1, n/2}];
    (* c = A001190 *) c[n_?OddQ] := c[n] = Sum[c[k]*c[n - k], {k, 1, (n - 1)/2}]; c[n_?EvenQ] := c[n] = Sum[c[k]*c[n - k], {k, 1, n/2 - 1}] + (1/2)*c[n/2]*(1 + c[n/2]); c[0] = 0; c[1] = 1;
    a[n_] := b[n] - 2 c[n];
    Array[a, 27] (* Jean-François Alcover, Sep 07 2019 *)

Formula

a(n) = A083563(n) - 2*A001190(n). - Andrew Howroyd, Sep 23 2018

Extensions

Terms a(11) and beyond from Andrew Howroyd, Sep 23 2018

A220820 Number of rooted binary leaf-multilabeled trees with n leaves on the label set [3].

Original entry on oeis.org

0, 0, 3, 27, 180, 1089, 6333, 36309, 207255, 1184829, 6799473, 39224568, 227554278, 1327688328, 7789644996, 45944320449, 272329169232, 1621636729257, 9697502473014, 58219671592098, 350791368690516, 2120672113779573, 12859687160772771, 78201772222916649
Offset: 1

Views

Author

N. J. A. Sloane, Dec 22 2012

Keywords

Crossrefs

Column k=3 of A319541.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<2, k*n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(b(n/2, k)))+add(b(i, k)*b(n-i, k), i=1..n/2))
        end:
    a:= n-> (k-> add((-1)^i*binomial(k, i)*b(n, k-i), i=0..k))(3):
    seq(a(n), n=1..30);  # Alois P. Heinz, Sep 07 2019
  • Mathematica
    b[n_, k_] := b[n, k] = If[n < 2, k n, If[OddQ[n], 0, Function[t, t(1 - t)/2 ][b[n/2, k]]] + Sum[b[i, k] b[n - i, k], {i, 1, n/2}]];
    a[n_] := Function[k, Sum[(-1)^i Binomial[k, i] b[n, k - i], {i, 0, k}]][3];
    Array[a, 30] (* Jean-François Alcover, Apr 08 2020, after Alois P. Heinz *)

Extensions

Terms a(11) and beyond from Andrew Howroyd, Sep 23 2018

A220821 Number of rooted binary leaf-multilabeled trees with n leaves on the label set [4].

Original entry on oeis.org

0, 0, 0, 15, 240, 2604, 24180, 207732, 1710108, 13739550, 108853512, 855732465, 6700902804, 52395480996, 409733313444, 3207687963129, 25155951725808, 197703130100532, 1557413160706764, 12298597436673711, 97359729090421320, 772615510913274126, 6145842794363133324
Offset: 1

Views

Author

N. J. A. Sloane, Dec 22 2012

Keywords

Crossrefs

Column k=4 of A319541.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<2, k*n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(b(n/2, k)))+add(b(i, k)*b(n-i, k), i=1..n/2))
        end:
    a:= n-> (k-> add((-1)^i*binomial(k, i)*b(n, k-i), i=0..k))(4):
    seq(a(n), n=1..30);  # Alois P. Heinz, Sep 07 2019
  • Mathematica
    A[n_, k_] := A[n, k] = If[n < 2, k n, If[OddQ[n], 0, (# (1 - #)/2)&[A[n/2, k]]] + Sum[A[i, k] A[n - i, k], {i, 1, n/2}]];
    T[n_, k_] := Sum[(-1)^i Binomial[k, i] A[n, k - i], {i, 0, k}];
    a[n_] := T[n, 4];
    Array[a, 23] (* Jean-François Alcover, Sep 02 2019, after Alois P. Heinz in A319541 *)

Extensions

Terms a(11) and beyond from Andrew Howroyd, Sep 23 2018

A220822 Number of rooted binary leaf-multilabeled trees with n leaves on the label set [5].

Original entry on oeis.org

0, 0, 0, 0, 105, 2625, 42075, 554820, 6578550, 73169250, 781319370, 8122058850, 82922497890, 836339477160, 8366154130425, 83235403604220, 825247074255735, 8165187992777430, 80704316324506860, 797435573602269015, 7881226621071221625, 77939438593071188565
Offset: 1

Views

Author

N. J. A. Sloane, Dec 22 2012

Keywords

Crossrefs

Column 5 of A319541.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<2, k*n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(b(n/2, k)))+add(b(i, k)*b(n-i, k), i=1..n/2))
        end:
    a:= n-> (k-> add((-1)^i*binomial(k, i)*b(n, k-i), i=0..k))(5):
    seq(a(n), n=1..30);  # Alois P. Heinz, Sep 07 2019
  • Mathematica
    b[n_, k_] := b[n, k] = If[n < 2, k n, If[OddQ[n], 0, Function[t, t (1 - t)/2][b[n/2, k]]] + Sum[b[i, k] b[n - i, k], {i, 1, n/2}]];
    a[n_] := Function[k, Sum[(-1)^i Binomial[k, i] b[n, k - i], {i, 0, k}]][5];
    Array[a, 30] (* Jean-François Alcover, Apr 08 2020, after Alois P. Heinz *)

Extensions

Terms a(11) and beyond from Andrew Howroyd, Sep 23 2018

A319580 Number of binary rooted trees with n leaves of n colors and all non-leaf nodes having out-degree 2.

Original entry on oeis.org

1, 3, 18, 215, 3600, 80136, 2213036, 73068543, 2806959015, 123002168300, 6055381161852, 330885794632536, 19872950226273053, 1301261803764756855, 92259974680854975000, 7041606755629152575055, 575638367425376279620662, 50180725346542105445190603
Offset: 1

Views

Author

Andrew Howroyd, Sep 23 2018

Keywords

Comments

Not all of the n colors need to be used.

Crossrefs

Main diagonal of A319539.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n<2, k*n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(A(n/2, k)))+add(A(i, k)*A(n-i, k), i=1..n/2))
        end:
    a:= n-> A(n$2):
    seq(a(n), n=1..20);  # Alois P. Heinz, Sep 23 2018
  • Mathematica
    A[n_, k_] := A[n, k] = If[n < 2, k n, If[OddQ[n], 0, Function[t, t(1-t) / 2][A[n/2, k]]] + Sum[A[i, k] A[n - i, k], {i, 1, n/2}]];
    a[n_] := A[n, n];
    Array[a, 20] (* Jean-François Alcover, Apr 10 2020, after Alois P. Heinz *)
  • PARI
    a(n)={my(v=vector(n)); v[1]=n; for(n=2, n, v[n]=sum(j=1, (n-1)\2, v[j]*v[n-j]) + if(n%2, 0, binomial(v[n/2]+1, 2))); v[n]} \\ Andrew Howroyd, Sep 23 2018
Showing 1-10 of 10 results.