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-3 of 3 results.

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.

A244407 Number of unlabeled rooted trees with 2n nodes and maximal outdegree (branching factor) n.

Original entry on oeis.org

1, 2, 6, 17, 50, 143, 416, 1199, 3474, 10049, 29119, 84377, 244748, 710199, 2062274, 5991418, 17416401, 50652248, 147384676, 429043390, 1249508947, 3640449679, 10610613552, 30937605076, 90237313083, 263288153074, 768449666117, 2243530461067, 6552016136667
Offset: 1

Views

Author

Joerg Arndt and Alois P. Heinz, Jun 27 2014

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-> b(2*n-1$2, n$2)-b(2*n-1$2, n-1$2):
    seq(a(n), n=1..30);
  • 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]}]] // FullSimplify] ; a[n_] := b[2*n - 1, 2 n - 1, n, n] - b[2*n - 1, 2 n - 1, n - 1, n - 1]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Feb 06 2015, after Maple *)

Formula

a(n) = A244372(2n,n).
a(n) ~ c * d^n / sqrt(n), where d = 2.955765285651994974714817524... is the Otter's rooted tree constant (see A051491), and c = 0.9495793... . - Vaclav Kotesovec, Jul 11 2014

A299098 Number of rooted identity trees with 2n nodes.

Original entry on oeis.org

0, 1, 2, 6, 25, 113, 548, 2770, 14426, 76851, 416848, 2294224, 12780394, 71924647, 408310668, 2335443077, 13446130438, 77863375126, 453203435319, 2649957419351, 15558520126830, 91687179000949, 542139459641933, 3215484006733932, 19125017153077911
Offset: 0

Views

Author

Alois P. Heinz, Feb 02 2018

Keywords

Examples

			a(3) = 6:
   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

Bisection of A004111 (even part).

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<2, n, add(b(n-k)*add(
          b(d)*d*(-1)^(k/d+1), d=divisors(k)), k=1..n-1)/(n-1))
        end:
    a:= n-> b(2*n):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[b[n-k]*Sum[b[d]*d*(-1)^(k/d + 1), {d, Divisors[k]}], {k, 1, n-1}]/(n-1)];
    a[n_] := b[2*n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 18 2018, after Alois P. Heinz *)
  • Python
    from sympy import divisors
    from sympy.core.cache import cacheit
    @cacheit
    def b(n): return n if n<2 else sum([b(n-k)*sum([b(d)*d*(-1)**(k//d+1) for d in divisors(k)]) for k in range(1, n)])//(n-1)
    def a(n): return b(2*n)
    print([a(n) for n in range(31)]) # Indranil Ghosh, Mar 02 2018, after Maple program

Formula

a(n) = A004111(2*n).
Showing 1-3 of 3 results.