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

A227774 Triangular array read by rows: T(n,k) is the number of rooted identity trees with n nodes having exactly k subtrees from the root.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 3, 6, 5, 1, 12, 11, 2, 25, 22, 5, 52, 49, 12, 113, 104, 28, 2, 247, 232, 65, 4, 548, 513, 152, 13, 1226, 1159, 351, 34, 2770, 2619, 818, 91, 1, 6299, 5989, 1907, 225, 6, 14426, 13734, 4460, 571, 18, 33209, 31729, 10453, 1403, 57, 76851
Offset: 1

Views

Author

Geoffrey Critzer, Jul 30 2013

Keywords

Comments

Row sums = A004111.

Examples

			Triangular array T(n,k) begins:
n\k:   0    1    2   3   4  ...
---+---------------------------
01 :   1;
02 :   .    1;
03 :   .    1;
04 :   .    1,   1;
05 :   .    2,   1;
06 :   .    3,   3;
07 :   .    6,   5,  1;
08 :   .   12,  11,  2;
09 :   .   25,  22,  5;
10 :   .   52,  49, 12;
11 :   .  113, 104, 28,  2;
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(b((i-1)$2), j)*b(n-i*j, i-1), j=0..n/i)))
        end:
    g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, expand(
          add(x^j*binomial(b((i-1)$2), j)*g(n-i*j, i-1), j=0..n/i))))
        end:
    T:= n-> `if`(n=1, 1,
        (p-> seq(coeff(p, x, k), k=1..degree(p)))(g((n-1)$2))):
    seq(T(n), n=1..25);  # Alois P. Heinz, Jul 30 2013
  • Mathematica
    nn=20;f[x_]:=Sum[a[n]x^n,{n,0,nn}];sol=SolveAlways[0==Series[f[x]-x Product[(1+x^i)^a[i],{i,1,nn}],{x,0,nn}],x];A004111=Drop[ Flatten[Table[a[n],{n,0,nn}]/.sol],1];Map[Select[#,#>0&]&, Drop[CoefficientList[Series[x Product[(1 + y x^i)^A004111[[i]],{i,1,nn}],{x,0,nn}],{x,y}],1]]//Grid
  • Python
    from sympy import binomial, Poly, Symbol
    from sympy.core.cache import cacheit
    x=Symbol('x')
    @cacheit
    def b(n, i):return 1 if n==0 else 0 if i<1 else sum([binomial(b(i - 1, i - 1), j)*b(n - i*j, i - 1) for j in range(n//i + 1)])
    @cacheit
    def g(n, i):return 1 if n==0 else 0 if i<1 else sum([x**j*binomial(b(i - 1, i - 1), j)*g(n - i*j, i - 1) for j in range(n//i + 1)])
    def T(n): return [1] if n==1 else Poly(g(n - 1, n - 1)).all_coeffs()[::-1][1:]
    for n in range(1, 26): print(T(n)) # Indranil Ghosh, Aug 28 2017

Formula

G.f.: x * Product_{n>=1} (1 + y * x^n)^A004111(n).
From Alois P. Heinz, Aug 25 2017: (Start)
T(n,k) = Sum_{h=0..n-k} A291529(n-1,h,k).
Sum_{k>=1} k * T(n,k) = A291532(n-1). (End)

A291203 Number F(n,h,t) of forests of t labeled rooted trees with n vertices such that h is the maximum of 0 and the tree heights; triangle of triangles F(n,h,t), n>=0, h=0..n, t=0..n-h, read by layers, then by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 1, 0, 3, 6, 0, 6, 0, 0, 0, 0, 0, 1, 0, 4, 24, 12, 0, 36, 24, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 5, 80, 90, 20, 0, 200, 300, 60, 0, 300, 120, 0, 120, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 240, 540, 240, 30, 0, 1170, 3000, 1260, 120, 0, 3360, 2520, 360, 0, 2520, 720, 0, 720, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 20 2017

Keywords

Comments

Positive elements in column t=1 give A034855.
Elements in rows h=0 give A023531.
Elements in rows h=1 give A059297.
Positive row sums per layer give A235595.
Positive column sums per layer give A061356.

Examples

			n h\t: 0   1   2  3  4 5 : A235595 : A061356          : A000272
-----+-------------------+---------+------------------+--------
0 0  : 1                 :         :                  : 1
-----+-------------------+---------+------------------+--------
1 0  : 0   1             :      1  :   .              :
1 1  : 0                 :         :   1              : 1
-----+-------------------+---------+------------------+--------
2 0  : 0   0   1         :      1  :   .   .          :
2 1  : 0   2             :      2  :   .              :
2 2  : 0                 :         :   2   1          : 3
-----+-------------------+---------+------------------+--------
3 0  : 0   0   0  1      :      1  :   .   .   .      :
3 1  : 0   3   6         :      9  :   .   .          :
3 2  : 0   6             :      6  :   .              :
3 3  : 0                 :         :   9   6   1      : 16
-----+-------------------+---------+------------------+--------
4 0  : 0   0   0  0  1   :      1  :   .   .   .  .   :
4 1  : 0   4  24 12      :     40  :   .   .   .      :
4 2  : 0  36  24         :     60  :   .   .          :
4 3  : 0  24             :     24  :   .              :
4 4  : 0                 :         :  64  48  12  1   : 125
-----+-------------------+---------+------------------+--------
5 0  : 0   0   0  0  0 1 :      1  :   .   .   .  . . :
5 1  : 0   5  80 90 20   :    195  :   .   .   .  .   :
5 2  : 0 200 300 60      :    560  :   .   .   .      :
5 3  : 0 300 120         :    420  :   .   .          :
5 4  : 0 120             :    120  :   .              :
5 5  : 0                 :         : 625 500 150 20 1 : 1296
-----+-------------------+---------+------------------+--------
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t, h) option remember; expand(`if`(n=0 or h=0, x^(t*n), add(
           binomial(n-1, j-1)*j*x^t*b(j-1, 0, h-1)*b(n-j, t, h), j=1..n)))
        end:
    g:= (n, h)-> b(n, 1, h)-`if`(h=0, 0, b(n, 1, h-1)):
    F:= (n, h, t)-> coeff(g(n, h), x, t):
    seq(seq(seq(F(n, h, t), t=0..n-h), h=0..n), n=0..8);
  • Mathematica
    b[n_, t_, h_] := b[n, t, h] = Expand[If[n == 0 || h == 0, x^(t*n), Sum[
         Binomial[n-1, j-1]*j*x^t*b[j-1, 0, h-1]*b[n-j, t, h], {j, 1, n}]]];
    g[n_, h_] := b[n, 1, h] - If[h == 0, 0, b[n, 1, h - 1]];
    F[n_, h_, t_] := Coefficient[g[n, h], x, t];
    Table[Table[Table[F[n, h, t], {t, 0, n - h}], {h, 0, n}], {n, 0, 8}] // Flatten (* Jean-François Alcover, Mar 17 2022, after Alois P. Heinz *)

Formula

Sum_{i=0..n} F(n,i,n-i) = A243014(n) = 1 + A038154(n).
Sum_{d=0..n} Sum_{i=0..d} F(n,i,d-i) = A000272(n+1).
Sum_{h=0..n} Sum_{t=0..n-h} t * F(n,h,t) = A089946(n-1) for n>0.
Sum_{h=0..n} Sum_{t=0..n-h} (h+1) * F(n,h,t) = A234953(n+1) for n>0.
Sum_{h=0..n} Sum_{t=0..n-h} (h+1)*(n+1) * F(n,h,t) = A001854(n+1) for n>0.
Sum_{t=0..n-1} F(n,1,t) = A235596(n+1).
F(2n,n,n) = A126804(n) for n>0.
F(n,0,n) = 1 = A000012(n).
F(n,1,1) = n = A001477(n) for n>1.
F(n,n-1,1) = n! = A000142(n) for n>0.
F(n,1,n-1) = A002378(n-1) for n>0.
F(n,2,1) = A000551(n).
F(n,3,1) = A000552(n).
F(n,4,1) = A000553(n).
F(n,1,2) = A001788(n-1) for n>2.
F(n,0,0) = A000007(n).

A291204 Number F(n,h,t) of forests of t labeled rooted trees with n vertices such that the root of each subtree contains the subtree's minimal label and h is the maximum of 0 and the tree heights; triangle of triangles F(n,h,t), n>=0, h=0..n, t=0..n-h, read by layers, then by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 3, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 7, 6, 0, 4, 4, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 15, 25, 10, 0, 14, 30, 10, 0, 8, 5, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 31, 90, 65, 15, 0, 51, 174, 120, 20, 0, 54, 63, 15, 0, 13, 6, 0, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 20 2017

Keywords

Comments

Elements in rows h=0 give A023531.
Positive elements in rows h=1 give A008277.
Positive row sums per layer (and - with a different offset - positive elements in column t=1) give A179454.
Positive column sums per layer give A132393.

Examples

			n h\t: 0  1  2  3  4 5 : A179454 : A132393       : A000142
-----+-----------------+---------+---------------+--------
0 0  : 1               :       1 :  1            : 1
-----+-----------------+---------+---------------+--------
1 0  : 0  1            :       1 :  .            :
1 1  : 0               :         :  1            : 1
-----+-----------------+---------+---------------+--------
2 0  : 0  0  1         :       1 :  .  .         :
2 1  : 0  1            :       1 :  .            :
2 2  : 0               :         :  1  1         : 2
-----+-----------------+---------+---------------+--------
3 0  : 0  0  0  1      :       1 :  .  .  .      :
3 1  : 0  1  3         :       4 :  .  .         :
3 2  : 0  1            :       1 :  .            :
3 3  : 0               :         :  2  3  1      : 6
-----+-----------------+---------+---------------+--------
4 0  : 0  0  0  0  1   :       1 :  .  .  .  .   :
4 1  : 0  1  7  6      :      14 :  .  .  .      :
4 2  : 0  4  4         :       8 :  .  .         :
4 3  : 0  1            :       1 :  .            :
4 4  : 0               :         :  6 11  6  1   : 24
-----+-----------------+---------+---------------+--------
5 0  : 0  0  0  0  0 1 :       1 :  .  .  .  . . :
5 1  : 0  1 15 25 10   :      51 :  .  .  .  .   :
5 2  : 0 14 30 10      :      54 :  .  .  .      :
5 3  : 0  8  5         :      13 :  .  .         :
5 4  : 0  1            :       1 :  .            :
5 5  : 0               :         : 24 50 35 10 1 : 120
-----+-----------------+---------+---------------+--------
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t, h) option remember; expand(`if`(n=0 or h=0, x^(t*n), add(
           binomial(n-1, j-1)*x^t*b(j-1, 0, h-1)*b(n-j, t, h), j=1..n)))
        end:
    g:= (n, h)-> b(n, 1, h)-`if`(h=0, 0, b(n, 1, h-1)):
    F:= (n, h, t)-> coeff(g(n, h), x, t):
    seq(seq(seq(F(n, h, t), t=0..n-h), h=0..n), n=0..8);
  • Mathematica
    b[n_, t_, h_] := b[n, t, h] = Expand[If[n == 0 || h == 0, x^(t*n), Sum[Binomial[n-1, j-1]*x^t*b[j-1, 0, h-1]*b[n-j, t, h], {j, 1, n}]]];
    g[n_, h_] := b[n, 1, h] - If[h == 0, 0, b[n, 1, h - 1]];
    F[n_, h_, t_] := Coefficient[g[n, h], x, t];
    Table[Table[Table[F[n, h, t], {t, 0, n - h}], {h, 0, n}], {n, 0, 8}] // Flatten (* Jean-François Alcover, Mar 17 2022, after Alois P. Heinz *)

Formula

Sum_{i=0..n} F(n,i,n-i) = A000325(n).
Sum_{d=0..n} Sum_{i=0..d} F(n,i,d-i) = A000142(n).
Sum_{h=0..n} Sum_{t=0..n-h} t * F(n,h,t) = A000254(n).
Sum_{t=0..n-1} F(n,1,t) = A058692(n) = A000110(n) - 1.
F(2n,n,n) = A001791(n) for n>0.
F(2n,1,n) = A007820(n).
F(n,1,n-1) = A000217(n-1) for n>0.
F(n,n-1,1) = A057427(n).
F(n,1,2) = A000225(n-1) for n>2.
F(n,0,n) = 1 = A000012(n).
F(n,0,0) = A000007(n).

A291336 Number F(n,h,t) of forests of t unlabeled rooted trees with n vertices such that h is the maximum of 0 and the tree heights; triangle of triangles F(n,h,t), n>=0, h=0..n, t=0..n-h, read by layers, then by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 2, 1, 0, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 2, 1, 0, 4, 3, 1, 0, 3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 3, 3, 2, 1, 0, 6, 8, 3, 1, 0, 8, 4, 1, 0, 4, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 3, 4, 3, 2, 1, 0, 10, 15, 9, 3, 1, 0, 18, 13, 4, 1, 0, 13, 5, 1, 0, 5, 1, 0, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 22 2017

Keywords

Comments

Elements in rows h=0 give A023531.
Positive elements in rows h=1 give A008284.
Positive row sums per layer (and - with a different offset - positive elements in column t=1) give A034781.
Positive column sums per layer give A033185.

Examples

			n h\t: 0 1 2 3 4 5 : A034781 : A033185   : A000081
-----+-------------+---------+-----------+--------
0 0  : 1           :         :           : 1
-----+-------------+---------+-----------+--------
1 0  : 0 1         :       1 : .         :
1 1  : 0           :         : 1         : 1
-----+-------------+---------+-----------+--------
2 0  : 0 0 1       :       1 : . .       :
2 1  : 0 1         :       1 : .         :
2 2  : 0           :         : 1 1       : 2
-----+-------------+---------+-----------+--------
3 0  : 0 0 0 1     :       1 : . . .     :
3 1  : 0 1 1       :       2 : . .       :
3 2  : 0 1         :       1 : .         :
3 3  : 0           :         : 2 1 1     : 4
-----+-------------+---------+-----------+--------
4 0  : 0 0 0 0 1   :       1 : . . . .   :
4 1  : 0 1 2 1     :       4 : . . .     :
4 2  : 0 2 1       :       3 : . .       :
4 3  : 0 1         :       1 : .         :
4 4  : 0           :         : 4 3 1 1   : 9
-----+-------------+---------+-----------+--------
5 0  : 0 0 0 0 0 1 :       1 : . . . . . :
5 1  : 0 1 2 2 1   :       6 : . . . .   :
5 2  : 0 4 3 1     :       8 : . . .     :
5 3  : 0 3 1       :       4 : . .       :
5 4  : 0 1         :       1 : .         :
5 5  : 0           :         : 9 6 3 1 1 : 20
-----+-------------+---------+-----------+--------
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, h) option remember; expand(`if`(n=0 or h=0
           or i=1, x^(t*n), b(n, i-1, t, h)+add(x^(t*j)*binomial(
           b(i-1$2, 0, h-1)+j-1, j)*b(n-i*j, i-1, t, h), j=1..n/i)))
        end:
    g:= (n, h)-> b(n$2, 1, h)-`if`(h=0, 0, b(n$2, 1, h-1)):
    F:= (n, h, t)-> coeff(g(n, h), x, t):
    seq(seq(seq(F(n, h, t), t=0..n-h), h=0..n), n=0..9);
  • Mathematica
    b[n_, i_, t_, h_] := b[n, i, t, h] = Expand[If[n == 0 || h == 0
         || i == 1, x^(t*n), b[n, i-1, t, h] + Sum[x^(t*j)*Binomial[
         b[i-1, i-1, 0, h-1]+j-1, j]*b[n - i*j, i-1, t, h], {j, 1, n/i}]]];
    g[n_, h_] := b[n, n, 1, h] - If[h == 0, 0, b[n, n, 1, h-1]];
    F[n_, h_, t_] := Coefficient[g[n, h], x, t];
    Table[Table[Table[F[n, h, t], {t, 0, n-h}], {h, 0, n}], {n, 0, 9}] //
    Flatten (* Jean-François Alcover, Mar 10 2022, after Alois P. Heinz *)

Formula

Sum_{d=0..n} Sum_{i=0..d} F(n,i,d-i) = A000081(n+1).
Sum_{h=0..n} Sum_{t=0..n-h} t * F(n,h,t) = A005197(n).
Sum_{h=0..n} Sum_{t=0..n-h} (h+1) * F(n,h,t) = A001853(n+1) for n>0.
Sum_{t=0..n-1} F(n,1,t) = A000065(n) = A000041(n) - 1.
F(n,1,1) = 1 for n>1.
F(n,0,0) = A000007(n).

A291532 Number of trees in all forests of (unlabeled) rooted identity trees with n vertices.

Original entry on oeis.org

0, 1, 1, 3, 4, 9, 19, 40, 84, 186, 413, 922, 2082, 4733, 10831, 24928, 57648, 133923, 312393, 731328, 1717784, 4047111, 9561517, 22647521, 53770164, 127941813, 305046676, 728688803, 1743752229, 4179697971, 10034077377, 24123567285, 58076419495, 139996849639
Offset: 0

Views

Author

Alois P. Heinz, Aug 25 2017

Keywords

Examples

			a(4) = 4:
:   o   :   o  o   :     o     :
:   |   :   |      :    / \    :
:   o   :   o      :   o   o   :
:   |   :   |      :   |       :
:   o   :   o      :   o       :
:   |   :          :           :
:   o   :          :           :
:       :          :           :
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; expand(`if`(n=0 or i=1,
           `if`(n<2, x^(t*n), 0), b(n, i-1, t)+add(binomial(
           b(i-1$2, 0), j)*x^(t*j)*b(n-i*j, i-1, t), j=1..n/i)))
        end:
    a:= n-> (p-> add(i*coeff(p,x,i), i=1..degree(p)))(b(n$2, 1)):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = Expand[If[n == 0 || i == 1,
         If[n < 2, x^(t*n), 0], b[n, i - 1, t] + Sum[Binomial[
         b[i - 1, i - 1, 0], j]*x^(t*j)*b[n - i*j, i - 1, t], {j, 1, n/i}]]];
    a[n_] := Function[p, Sum[i*Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][
         b[n, n, 1]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Apr 29 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>=1} k * A227774(n+1,k).
a(n) = Sum_{h=0..n} Sum_{t=0..n-h} t * A291529(n,h,t).

A291559 Total height of all (unlabeled) rooted identity trees with n vertices.

Original entry on oeis.org

0, 0, 1, 2, 5, 10, 23, 52, 120, 275, 644, 1508, 3558, 8418, 20012, 47699, 114082, 273476, 657250, 1582817, 3819514, 9233059, 22356918, 54216429, 131663670, 320158789, 779461271, 1899830067, 4635492672, 11321595218, 27677333555, 67720658475, 165835173692
Offset: 0

Views

Author

Alois P. Heinz, Aug 26 2017

Keywords

Examples

			: a(5) = 10 = 4 + 3 + 3 : a(4) = 5 = 3 + 2 :
:                       :                  :
:    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

  • Maple
    b:= proc(n, i, t, h) option remember; expand(`if`(n=0 or h=0 or i=1,
          `if`(n<2, x^(t*n), 0), b(n, i-1, t, h)+add(x^(t*j)*binomial(
           b(i-1$2, 0, h-1), j)*b(n-i*j, i-1, t, h), j=1..n/i)))
        end:
    g:= (n, h)-> b(n$2, 1, h)-`if`(h=0, 0, b(n$2, 1, h-1)):
    F:= (n, h, t)-> coeff(g(n, h), x, t):
    a:= n-> add(add((h+1)*F(n-1, h, t), t=1..n-1-h), h=0..n-2):
    seq(a(n), n=0..37);
  • Mathematica
    b[n_, i_, t_, h_] := b[n, i, t, h] = Expand[If[n == 0 || h == 0 || i == 1,
       If[n < 2, x^(t*n), 0], b[n, i-1, t, h] + Sum[x^(t*j)*Binomial[
       b[i-1, i-1, 0, h-1], j]*b[n-i*j, i-1, t, h], {j, 1, n/i}]]];
    g[n_, h_] := b[n, n, 1, h] - If[h == 0, 0, b[n, n, 1, h-1]];
    F[n_, h_, t_] := Coefficient[g[n, h], x, t];
    a[n_] := Sum[Sum[(h+1)*F[n-1, h, t], {t, 1, n-1-h}], {h, 0, n-2}];
    Table[a[n], {n, 0, 37}] (* Jean-François Alcover, Dec 08 2023, after Alois P. Heinz *)

Formula

a(n) = Sum_{h=0..n-2} Sum_{t=1..n-1-h} (h+1) * A291529(n-1,h,t).
Showing 1-6 of 6 results.