login

Revision History for A005588

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of free binary trees admitting height n.
(history; published version)
#68 by N. J. A. Sloane at Sun Aug 28 08:22:55 EDT 2022
STATUS

proposed

approved

#67 by Michel Marcus at Thu Aug 25 08:10:32 EDT 2022
STATUS

editing

proposed

#66 by Michel Marcus at Thu Aug 25 08:10:22 EDT 2022
LINKS

Harary, Frank; Palmer, Edgar M.; Robinson, Robert W., <a href="http://wwwcobweb.cs.uga.edu/~rwr/publications/binary.pdf">Counting free binary trees admitting a given height</a>, J. Combin. Inform. System Sci. 17 (1992), no. 1-2, 175--181. MR1216977 (94c:05039)

STATUS

proposed

editing

Discussion
Thu Aug 25
08:10
Michel Marcus: broken link
#65 by Jean-François Alcover at Thu Aug 25 07:21:16 EDT 2022
STATUS

editing

proposed

#64 by Jean-François Alcover at Thu Aug 25 07:20:36 EDT 2022
MATHEMATICA

bin2[n_] = Binomial[n, 2]; bin3[n_] = Binomial[n, 3]; p[0] = q[0] = 0; p[1] = q[1] = 1; q[h1_] := q[h1] = With[{h = h1-1}, q[h] + p[h]]; p[h1_] := p[h1] = With[{h = h1-1}, bin2[1 + p[h]] + p[h] q[h]]; a[h_] := a[h] = bin3[2 + p[h]] + bin2[1 + p[h]] q[h]; b[h_] := b[h] = bin2[1 + p[h]]; e[h_, i_] := e[h, i] = 1 + Sum[d[j, i], {j, h-1}]; d[h_, h_] := 0; d[h_, i_] := p[h] /; i > h; d[h1_, i1_] := d[h1, i1] = With[{h = h1-1, i = i1-1}, bin2[1 + d[h, i]] + d[h, i] e[h, i]]; d[h_, 1] := d[h, 1] = p[h] - p[h-1]; e[h_, 1] := e[h, 1] = p[h-1]; t1[h_] := Sum[a[h-i] - bin3[2 + d[h-i, i]] - bin2[1 + d[h-i, i]] e[h-i, i], {i, Quotient[h, 2]}]; t2[h_] := Sum[b[h-i+1] - bin2[1 + d[h-i+1, i]], {i, Quotient[h+1, 2]}]; t[h_] := bin2[1 + p[h]] + t1[h] + t2[h]; (* Jean-François Alcover, Apr 22 2013, program corrected and improved by Michael Somos *)

bin2[n_] = Binomial[n, 2];

bin3[n_] = Binomial[n, 3];

p[0] = q[0] = 0;

p[1] = q[1] = 1;

q[h1_] := q[h1] = With[{h = h1-1}, q[h] + p[h]];

p[h1_] := p[h1] = With[{h = h1-1}, bin2[1 + p[h]] + p[h] q[h]];

a[h_] := a[h] = bin3[2 + p[h]] + bin2[1 + p[h]] q[h];

b[h_] := b[h] = bin2[1 + p[h]];

e[h_, i_] := e[h, i] = 1 + Sum[d[j, i], {j, h-1}];

d[h_, h_] := 0; d[h_, i_] := p[h] /; i > h;

d[h1_, i1_] := d[h1, i1] = With[{h = h1-1, i = i1-1}, bin2[1 + d[h, i]] + d[h, i] e[h, i]]; d[h_, 1] := d[h, 1] = p[h] - p[h-1];

e[h_, 1] := e[h, 1] = p[h-1];

t1[h_] := Sum[a[h-i] - bin3[2 + d[h-i, i]] - bin2[1 + d[h-i, i]] e[h-i, i], {i, Quotient[h, 2]}];

t2[h_] := Sum[b[h-i+1] - bin2[1 + d[h-i+1, i]], {i, Quotient[h+1, 2]}];

t[h_] := bin2[1 + p[h]] + t1[h] + t2[h];

Table[t[n], {n, 1, 12}] (* Jean-François Alcover, Apr 22 2013, program corrected and improved by Michael Somos *)

STATUS

approved

editing

Discussion
Thu Aug 25
07:21
Jean-François Alcover: Cosmetic edit of Mma program
#63 by N. J. A. Sloane at Thu Feb 22 22:58:11 EST 2018
STATUS

editing

approved

#62 by N. J. A. Sloane at Thu Feb 22 22:58:09 EST 2018
LINKS

David Wassermann, <a href="/A005588/b005588.txt">Table of n, a(n) for n = 1..2112</a>

STATUS

approved

editing

#61 by N. J. A. Sloane at Sat Jul 01 18:03:32 EDT 2017
STATUS

proposed

approved

#60 by Rachel Barnett at Sat Jul 01 17:41:33 EDT 2017
STATUS

editing

proposed

#59 by Rachel Barnett at Sat Jul 01 17:41:24 EDT 2017
LINKS

Harary, Frank; Palmer, Edgar M.; Robinson, Robert W., <a href="/A005588/a005588.pdf">Counting free binary trees admitting a given height</a>, J. Combin. Inform. System Sci. 17 (1992), no. 1-2, 175-181. (Annotated scanned copy)

Harary, Frank; Palmer, Edgar M.; Robinson, Robert W., <a href="/A005588/a005588.pdf">Counting free binary trees admitting a given height</a>, J. Combin. Inform. System Sci. 17 (1992), no. 1-2, 175-181. (Annotated scanned copy)