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!)
A001131 Number of red-black rooted trees with n-1 internal nodes. 1
0, 1, 2, 2, 3, 8, 14, 20, 35, 64, 122, 260, 586, 1296, 2708, 5400, 10468, 19888, 37580, 71960, 140612, 279264, 560544, 1133760, 2310316, 4750368, 9876264, 20788880, 44282696, 95241664, 206150208, 447470464, 970862029, 2100029344 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Are a(2) = a(3) = 2 and a(4) = 3 the only primes in this sequence? - Jonathan Vos Post, Jun 17 2005
LINKS
Eric Weisstein's World of Mathematics, Red-Black Tree.
FORMULA
a(1) = 1, a(2) = 2 and for n>2: a(n) = Sum_[n/4 <= m <= n/2] binomial(2m,n-2m)*a(m), John Moon, as quoted in Ruskey. - Jonathan Vos Post, Jun 17 2005.
G.f. satisfies: A(x) = x+x^2 + A((x+x^2)^2). - Paul D. Hanna, Jun 14 2012
MAPLE
spec := [B, {B=Union(Z, Subst(M, B)), M=Union(Prod(Z, Z), Prod(Z, Z, Z, Z))} ]; [seq(combstruct[count](spec, size=2*n), n=0..40)]; # N. J. A. Sloane, Dec 21 2000. Compare A014535, A037026.
a := proc(n) option remember; if n < 3 then return n fi; add(binomial(2*k, n-2*k)*a(k), k = iquo(n, 4)..iquo(n, 2)) end:
seq(a(n), n=0..33); # Peter Luschny, Oct 23 2019
MATHEMATICA
m = 34; A[_] = 0;
Do[A[x_] = x + x^2 + A[(x + x^2)^2] + O[x]^m // Normal, {m}];
CoefficientList[A[x], x] (* Jean-François Alcover, Oct 23 2019 *)
PROG
(PARI) {a(n)=local(A=x+x^2+x*O(x^n)); for(i=1, n, A=x+x^2+subst(A, x, (x+x^2)^2+x*O(x^n))); polcoeff(A, n)} \\ Paul D. Hanna, Jun 14 2012
CROSSREFS
Sequence in context: A159789 A153932 A158763 * A019177 A153941 A184844
KEYWORD
nonn
AUTHOR
STATUS
approved

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 23 09:22 EDT 2024. Contains 371905 sequences. (Running on oeis4.)