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

A299038 Number A(n,k) of rooted trees with n nodes where each node has at most k children; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 2, 3, 1, 0, 1, 1, 1, 2, 4, 6, 1, 0, 1, 1, 1, 2, 4, 8, 11, 1, 0, 1, 1, 1, 2, 4, 9, 17, 23, 1, 0, 1, 1, 1, 2, 4, 9, 19, 39, 46, 1, 0, 1, 1, 1, 2, 4, 9, 20, 45, 89, 98, 1, 0, 1, 1, 1, 2, 4, 9, 20, 47, 106, 211, 207, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Feb 01 2018

Keywords

Examples

			Square array A(n,k) begins:
  1, 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
  1, 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
  0, 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
  0, 1,   2,   2,   2,   2,   2,   2,   2,   2,   2, ...
  0, 1,   3,   4,   4,   4,   4,   4,   4,   4,   4, ...
  0, 1,   6,   8,   9,   9,   9,   9,   9,   9,   9, ...
  0, 1,  11,  17,  19,  20,  20,  20,  20,  20,  20, ...
  0, 1,  23,  39,  45,  47,  48,  48,  48,  48,  48, ...
  0, 1,  46,  89, 106, 112, 114, 115, 115, 115, 115, ...
  0, 1,  98, 211, 260, 277, 283, 285, 286, 286, 286, ...
  0, 1, 207, 507, 643, 693, 710, 716, 718, 719, 719, ...
		

Crossrefs

Main diagonal gives A000081 for n>0.
A(2n,n) gives A299039.
Cf. A244372.

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    A:= (n, k)-> `if`(n=0, 1, b(n-1$2, k$2)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i<1, 0, Sum[Binomial[ b[i-1, i-1, k, k]+j-1, j]*b[n-i*j, i-1, t-j, k], {j, 0, Min[t, n/i]}]]];
    A[n_, k_] := If[n == 0, 1, b[n - 1, n - 1, k, k]];
    Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jun 04 2018, from Maple *)
  • Python
    from sympy import binomial
    from sympy.core.cache import cacheit
    @cacheit
    def b(n, i, t, k): return 1 if n==0 else 0 if i<1 else sum([binomial(b(i-1, i-1, k, k)+j-1, j)*b(n-i*j, i-1, t-j, k) for j in range(min(t, n//i)+1)])
    def A(n, k): return 1 if n==0 else b(n-1, n-1, k, k)
    for d in range(15): print([A(n, d-n) for n in range(d+1)]) # Indranil Ghosh, Mar 02 2018, after Maple code

Formula

A(n,k) = Sum_{i=0..k} A244372(n,i) for n>0, A(0,k) = 1.

A036722 G.f. satisfies A(x) = 1 + x*cycle_index(Sym(6), A(x)).

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 20, 48, 114, 283, 710, 1816, 4690, 12267, 32338, 85978, 230080, 619521, 1676808, 4560286, 12454272, 34143682, 93928091, 259208006, 717375068, 1990625390, 5537142610, 15436744525, 43124847431, 120708508008, 338477040445, 950714584576
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the number of rooted trees where each node has at most 6 children. [Patrick Devlin, Apr 29 2012]

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2, 6$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 20 2017
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[ Binomial[b[i - 1, i - 1, k, k] + j - 1, j]*b[n - i*j, i - 1, t - j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[n - 1, n - 1, 6, 6]];
    Table[a[n] , {n, 0, 35}] // Flatten (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

a(n) = Sum_{j=1..6} A244372(n,j) for n>0, a(0) = 1. - Alois P. Heinz, Sep 19 2017
a(n) / a(n+1) ~ 0.338887196052856714304749078960983936661485522864792573284374... - Robert A. Russell, Feb 11 2023

A036721 G.f. satisfies A(x) = 1 + x*cycle_index(Sym(5), A(x)).

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 20, 47, 112, 277, 693, 1766, 4547, 11852, 31146, 82534, 220149, 590834, 1593951, 4320723, 11761394, 32138301, 88121176, 242383729, 668607115, 1849194691, 5126800907, 14245679652, 39666239726, 110661514973, 309280533011, 865839831118
Offset: 0

Views

Author

Keywords

Comments

Also the number of rooted trees where each node has at most 5 children. [Patrick Devlin, Apr 30 2012]

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2, 5$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 20 2017
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[ Binomial[b[i - 1, i - 1, k, k] + j - 1, j]*b[n - i*j, i - 1, t - j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[n - 1, n - 1, 5, 5]];
    Table[a[n], {n, 0, 35}] // Flatten (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

a(n) = Sum_{j=1..5} A244372(n,j) for n>0, a(0) = 1. - Alois P. Heinz, Sep 19 2017
a(n) / a(n+1) ~ 0.340017469151060086823930137816585262710976835711484267209811... - Robert A. Russell, Feb 11 2023

A292556 Number of rooted unlabeled trees on n nodes where each node has at most 11 children.

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4766, 12485, 32970, 87802, 235355, 634771, 1720940, 4688041, 12824394, 35216524, 97039824, 268238379, 743596131, 2066801045, 5758552717, 16080588286, 44997928902, 126160000878, 354349643101, 996946927831
Offset: 0

Views

Author

Marko Riedel, Sep 18 2017

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2, 11$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 20 2017
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i<1, 0, Sum[Binomial[ b[i-1, i-1, k, k]+j-1, j]*b[n-i*j, i-1, t-j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[n-1, n-1, 11, 11]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 05 2018, after Alois P. Heinz *)

Formula

Functional equation of g.f. is T(z) = z + z*Sum_{q=1..11} Z(S_q)(T(z)) with Z(S_q) the cycle index of the symmetric group.
Alternate FEQ is T(z) = 1 + z*Z(S_11)(T(z)).
a(n) = Sum_{j=1..11} A244372(n,j) for n > 0, a(0) = 1. - Alois P. Heinz, Sep 20 2017
Limit_{n->oo} a(n)/a(n+1) = 0.338324339068091181557475416836618315086769320447748735003402... - Robert A. Russell, Feb 11 2023

A292553 Number of rooted unlabeled trees on n nodes where each node has at most 8 children.

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 20, 48, 115, 286, 718, 1839, 4757, 12460, 32897, 87592, 234746, 633013, 1715851, 4673320, 12781759, 35093010, 96681705, 267199518, 740580555, 2058042803, 5733101603, 16006590851, 44782679547, 125533577578, 352525803976, 991634575368
Offset: 0

Views

Author

Marko Riedel, Sep 18 2017

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2, 8$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 20 2017
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[ Binomial[b[i - 1, i - 1, k, k] + j - 1, j]*b[n - i*j, i - 1, t - j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[n - 1, n - 1, 8, 8]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

Functional equation of G.f. is T(z) = z + z*Sum_{q=1..8} Z(S_q)(T(z)) with Z(S_q) the cycle index of the symmetric group. Alternate FEQ is T(z) = 1 + z*Z(S_8)(T(z)).
a(n) = Sum_{j=1..8} A244372(n,j) for n>0, a(0) = 1. - Alois P. Heinz, Sep 20 2017
a(n) / a(n+1) ~ 0.338386042364849957035744926227166370702775721795018600630554... - Robert A. Russell, Feb 11 2023

A292554 Number of rooted unlabeled trees on n nodes where each node has at most 9 children.

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1841, 4763, 12477, 32947, 87735, 235162, 634212, 1719325, 4683368, 12810871, 35177357, 96926335, 267909285, 742641309, 2064029034, 5750500663, 16057186086, 44929879114, 125962026154, 353773417487, 995269027339
Offset: 0

Views

Author

Marko Riedel, Sep 18 2017

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2, 9$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 20 2017
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[ Binomial[b[i - 1, i - 1, k, k] + j - 1, j]*b[n - i*j, i - 1, t - j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[n - 1, n - 1, 9, 9]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

Functional equation of G.f. is T(z) = z + z*Sum_{q=1..9} Z(S_q)(T(z)) with Z(S_q) the cycle index of the symmetric group. Alternate FEQ is
T(z) = 1 + z*Z(S_9)(T(z)).
a(n) = Sum_{j=1..9} A244372(n,j) for n>0, a(0) = 1. - Alois P. Heinz, Sep 20 2017
a(n) / a(n+1) ~ 0.338343552789108712866488147828528012266693326385052387884853... - Robert A. Russell, Feb 11 2023

A292555 Number of rooted unlabeled trees on n nodes where each node has at most 10 children.

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4765, 12483, 32964, 87785, 235305, 634628, 1720524, 4686842, 12820920, 35206475, 97010705, 268154003, 743351390, 2066090876, 5756490561, 16074597300, 44980514021, 126109353817, 354202275766, 996517941454
Offset: 0

Views

Author

Marko Riedel, Sep 18 2017

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2, 10$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 20 2017
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[ Binomial[b[i - 1, i - 1, k, k] + j - 1, j]*b[n - i*j, i - 1, t - j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[n - 1, n - 1, 10, 10]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

Functional equation of G.f. is T(z) = z + z*Sum_{q=1..10} Z(S_q)(T(z)) with Z(S_q) the cycle index of the symmetric group. Alternate FEQ is
T(z) = 1 + z*Z(S_10)(T(z)).
a(n) = Sum_{j=1..10} A244372(n,j) for n>0, a(0) = 1. - Alois P. Heinz, Sep 20 2017
a(n) / a(n+1) ~ 0.338329194566131211670667671160855741193081902868090986608524... - Robert A. Russell, Feb 11 2023

A182378 G.f. satisfies A(x) = 1 + x*cycle_index(Sym(7), A(x)).

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 20, 48, 115, 285, 716, 1833, 4740, 12410, 32754, 87176, 233547, 629540, 1705809, 4644231, 12697500, 34848694, 95973026, 265142431, 734606478, 2040683413, 5682634446, 15859800889, 44355531103, 124290064228, 348904212741, 981082979409
Offset: 0

Views

Author

Michael Burkhart, Apr 26 2012

Keywords

Comments

Number of rooted trees where each node has at most 7 children.

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2, 7$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 20 2017
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[ Binomial[ b[i-1, i-1, k, k] + j - 1, j]*b[n-i*j, i-1, t-j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[n-1, n-1, 7, 7]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 15 2018, after Alois P. Heinz *)

Formula

a(n) = Sum_{j=1..7} A244372(n,j) for n>0, a(0) = 1. - Alois P. Heinz, Sep 19 2017
a(n) / a(n+1) ~ 0.338512011286603947719604869750539045616436718225097926729820... - Robert A. Russell, Feb 11 2023

Extensions

More terms from Patrick Devlin, Apr 29 2012

A036719 G.f. satisfies A(x) = 1 + x*cycle_index(Cyclic(4), A(x)).

Original entry on oeis.org

1, 1, 1, 3, 7, 22, 65, 212, 697, 2372, 8179, 28703, 101851, 365393, 1322034, 4820378, 17691018, 65306700, 242317423, 903242615, 3380707920, 12700575742, 47874113728, 181013422393, 686341240781, 2609093456212, 9941953711409
Offset: 0

Views

Author

Keywords

Crossrefs

A036650 Number of 5-valent trees with n nodes.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 10, 21, 42, 94, 204, 473, 1098, 2633, 6353, 15641, 38789, 97416, 246410, 628726, 1614292, 4171955, 10839366, 28308678, 74266477, 195667533, 517504253, 1373640355, 3658205088, 9772510063, 26181295237, 70330621171
Offset: 0

Views

Author

Keywords

Crossrefs

Column k=5 of A144528; A036718 (rooted trees).

Programs

  • Mathematica
    n = 30; (* algorithm from Rains and Sloane *)
    S4[f_,h_,x_] := f[h,x]^4/24 + f[h,x]^2 f[h,x^2]/4 + f[h,x] f[h,x^3]/3 + f[h,x^2]^2/8 + f[h,x^4]/4;
    S5[f_,h_,x_] := f[h,x]^5/120 + f[h,x]^3 f[h,x^2]/12 + f[h,x]^2 f[h,x^3]/6 + f[h,x] f[h,x^2]^2/8 + f[h,x] f[h,x^4]/4 + f[h,x^2] f[h,x^3]/6 + f[h,x^5]/5;
    T[-1,z_] := 1;  T[h_,z_] := T[h,z] = Table[z^k, {k,0,n}].Take[CoefficientList[z^(n+1) + 1 + S4[T,h-1,z]z, z], n+1];
    Sum[Take[CoefficientList[z^(n+1) + S5[T,h-1,z]z - S5[T,h-2,z]z - (T[h-1,z] - T[h-2,z]) (T[h-1,z]-1),z], n+1], {h,1,n/2}] + PadRight[{0,1}, n+1] + Sum[Take[CoefficientList[z^(n+1) + (T[h,z] - T[h-1,z])^2/2 + (T[h,z^2] - T[h-1,z^2])/2, z],n+1], {h,0,n/2}] (* Robert A. Russell, Sep 15 2018 *)
    b[n_, i_, t_, k_] := b[n,i,t,k] = If[i<1, 0, Sum[Binomial[b[i-1,i-1,
      k,k] + j-1, j]* b[n-i*j, i-1, t-j, k], {j, 0, Min[t, n/i]}]];
    b[0, i_, t_, k_] = 1; m = 4; (* m = maximum children *) n = 40;
    gf[x_] = 1 + Sum[b[j-1,j-1,m,m]x^j,{j,1,n}]; (* G.f. for A036718 *)
    ci[x_] = SymmetricGroupIndex[m+1, x] /. x[i_] -> gf[x^i];
    CoefficientList[Normal[Series[gf[x] - (gf[x]^2 - gf[x^2])/2 + x ci[x],
    {x, 0, n}]],x] (* Robert A. Russell, Jan 19 2023 *)

Formula

a(n) = A036648(n) + A036649(n) for n > 0.
G.f.: B(x) - cycle_index(S2,-B(x)) + x * cycle_index(S5,B(x)) = B(x) - (B(x)^2 - B(x^2)) / 2 + x * (B(x)^5 + 10*B(x)^3*B(x^2) + 15*B(x)*B(x^2)^2 + 20*B(x)^2*B(x^3) + 20*B(x^2)*B(x^3) + 30*B(x)*B(x^4) + 24*B(x^5)) / 120, where B(x) = 1 + x * cycle_index(S4,B(x)) = 1 + x * (B(x)^4 + 6*B(x)^2*B(x^2) + 8*B(x)*B(x^3) + 3*B(x^2)^2 + 6*B(x^4)) / 24 is the generating function for A036718. - Robert A. Russell, Jan 19 2023

Extensions

a(0) changed to 1 by Andrew Howroyd, Dec 18 2020
Showing 1-10 of 12 results. Next