[go: up one dir, main page]

login
Revision History for A217710 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Cardinality of the set of possible heights of AVL trees with n (leaf-) nodes.
(history; published version)
#39 by Alois P. Heinz at Sat Aug 14 18:34:24 EDT 2021
STATUS

editing

approved

#38 by Alois P. Heinz at Sat Aug 14 18:34:18 EDT 2021
MAPLE

# second Maple program:

a:= proc(n) option remember; `if`(n=0, 1, a(n-1)+

`if`((t-> issqr(t+4) or issqr(t-4))(5*n^2), 1, 0)-

`if`((t-> is(2^ilog2(t)=t))(n-1), 1, 0))

end:

seq(a(n), n=1..120); # Alois P. Heinz, Aug 14 2021

STATUS

approved

editing

#37 by Alois P. Heinz at Tue Jun 27 15:27:00 EDT 2017
STATUS

editing

approved

#36 by Alois P. Heinz at Tue Jun 27 15:26:02 EDT 2017
STATUS

approved

editing

#35 by Alois P. Heinz at Tue Feb 07 17:04:38 EST 2017
STATUS

editing

approved

#34 by Alois P. Heinz at Tue Feb 07 17:04:34 EST 2017
LINKS

Wikipedia, <a href="httphttps://en.wikipedia.org/wiki/AVL_tree">AVL tree</a>

STATUS

approved

editing

#33 by Joerg Arndt at Mon Dec 30 04:19:41 EST 2013
STATUS

proposed

approved

#32 by Jean-François Alcover at Mon Dec 30 03:32:51 EST 2013
STATUS

editing

proposed

#31 by Jean-François Alcover at Mon Dec 30 03:32:45 EST 2013
MATHEMATICA

a[n_] := Module[{j, p}, For[j = Log[(1+Sqrt[5])/2, n] // Floor, Fibonacci[j+1] <= n, j++]; p = Log[2, n] // Floor; j-p-If[2^p < n, 2, 1]]; Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Dec 30 2013, translated from Maple *)

STATUS

approved

editing

#30 by Alois P. Heinz at Wed Mar 20 16:09:45 EDT 2013
STATUS

editing

approved