login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265846 Number of permutations of {1,2,...,2n} that result in a binary search tree of height n. 4

%I #30 Mar 17 2024 05:34:40

%S 1,0,0,80,11360,1508032,197163648,27624399104,4256968553472,

%T 724948555548672,136034167652859904,27976811931437752320,

%U 6269253131872946298880,1522110257603797873737728,398311795891656532955725824,111813044381693547723191418880

%N Number of permutations of {1,2,...,2n} that result in a binary search tree of height n.

%H Alois P. Heinz, <a href="/A265846/b265846.txt">Table of n, a(n) for n = 0..250</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Binary_search_tree">Binary search tree</a>

%H <a href="/index/Ro#rooted">Index entries for sequences related to rooted trees</a>

%H <a href="/index/Tra#trees">Index entries for sequences related to trees</a>

%F a(n) = A195581(2n,n) = A244108(2n,n).

%F a(n) ~ c * d^n * (n-1)!, where d = -16*LambertW(-1, -exp(-1/2)/2)^2 / (1 + 2*LambertW(-1, -exp(-1/2)/2)) = 19.643259858273023595006139220961408..., c = 0.0646979349409396546649864277836... . - _Vaclav Kotesovec_, Jan 02 2016, updated Mar 17 2024

%p b:= proc(n, k) option remember; `if`(n<2, `if`(k<n, 0, 1),

%p add(binomial(n-1, r)*b(r, k-1)*b(n-1-r, k-1), r=0..n-1))

%p end:

%p a:= n-> b(2*n, n)-b(2*n, n-1):

%p seq(a(n), n=0..20);

%t b[n_, k_] := b[n, k] = If[n<2, If[k<n, 0, 1], Sum[Binomial[n-1, r]*b[r, k-1]*b[n-1-r, k-1], {r, 0, n-1}]]; a[n_] := b[2*n, n] - b[2*n, n-1]; Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Feb 25 2017, translated from Maple *)

%Y Cf. A195581, A244108.

%K nonn

%O 0,4

%A _Alois P. Heinz_, Dec 21 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)