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.

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).